; unsigned short __stdcall EncodeHostToDevice(char *, char *, unsigned short, unsigned short, unsigned short, unsigned short, int, int, bool) .text:00001440 public ?EncodeHostToDevice@@YGGPAD0GGGGHH_N@Z .text:00001440 ?EncodeHostToDevice@@YGGPAD0GGGGHH_N@Z proc near .text:00001440 .text:00001440 arg_0 = dword ptr 8 .text:00001440 arg_4 = dword ptr 0Ch .text:00001440 arg_8 = byte ptr 10h .text:00001440 arg_C = word ptr 14h .text:00001440 arg_10 = word ptr 18h .text:00001440 arg_14 = dword ptr 1Ch .text:00001440 arg_18 = dword ptr 20h .text:00001440 arg_1C = dword ptr 24h .text:00001440 arg_20 = byte ptr 28h .text:00001440 .text:00001440 mov edi, edi .text:00001442 push ebp .text:00001443 mov ebp, esp .text:00001445 cmp [ebp+arg_20], 0 .text:00001449 push ebx .text:0000144A mov ebx, [ebp+arg_14] .text:0000144D push esi .text:0000144E push edi .text:0000144F jz short loc_145C .text:00001451 lea eax, [ebx+8] .text:00001454 movzx eax, ax .text:00001457 mov [ebp+arg_14], eax .text:0000145A jmp short loc_1463 .text:0000145C ; --------------------------------------------------------------------------- .text:0000145C .text:0000145C loc_145C: ; CODE XREF: EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+Fj .text:0000145C mov [ebp+arg_14], 8 .text:00001463 .text:00001463 loc_1463: ; CODE XREF: EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+1Aj .text:00001463 movzx edi, word ptr [ebp+arg_14] .text:00001467 mov esi, [ebp+arg_0] .text:0000146A lea eax, [edi+1] .text:0000146D push eax .text:0000146E push 0 .text:00001470 push esi .text:00001471 call _memset .text:00001476 mov ecx, [ebp+arg_1C] .text:00001479 add esp, 0Ch .text:0000147C cmp [ebp+arg_20], 0 .text:00001480 setnz al .text:00001483 dec al .text:00001485 and eax, 0FFFFFF80h .text:00001488 dec ecx .text:00001489 jz short loc_149D .text:0000148B dec ecx .text:0000148C jz short loc_1497 .text:0000148E dec ecx .text:0000148F jnz short loc_149F .text:00001491 and al, 0DFh .text:00001493 or al, 40h .text:00001495 jmp short loc_149F .text:00001497 ; --------------------------------------------------------------------------- .text:00001497 .text:00001497 loc_1497: ; CODE XREF: EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+4Cj .text:00001497 and al, 0BFh .text:00001499 or al, 20h .text:0000149B jmp short loc_149F .text:0000149D ; --------------------------------------------------------------------------- .text:0000149D .text:0000149D loc_149D: ; CODE XREF: EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+49j .text:0000149D and al, 9Fh .text:0000149F .text:0000149F loc_149F: ; CODE XREF: EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+4Fj .text:0000149F ; EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+55j ... .text:0000149F mov ecx, [ebp+arg_18] .text:000014A2 dec ecx .text:000014A3 jz short loc_14C0 .text:000014A5 dec ecx .text:000014A6 jz short loc_14BA .text:000014A8 dec ecx .text:000014A9 jz short loc_14B4 .text:000014AB dec ecx .text:000014AC jnz short loc_14C2 .text:000014AE and al, 0E3h .text:000014B0 or al, 3 .text:000014B2 jmp short loc_14C2 .text:000014B4 ; --------------------------------------------------------------------------- .text:000014B4 .text:000014B4 loc_14B4: ; CODE XREF: EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+69j .text:000014B4 and al, 0E2h .text:000014B6 or al, 2 .text:000014B8 jmp short loc_14C2 .text:000014BA ; --------------------------------------------------------------------------- .text:000014BA .text:000014BA loc_14BA: ; CODE XREF: EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+66j .text:000014BA and al, 0E1h .text:000014BC or al, 1 .text:000014BE jmp short loc_14C2 .text:000014C0 ; --------------------------------------------------------------------------- .text:000014C0 .text:000014C0 loc_14C0: ; CODE XREF: EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+63j .text:000014C0 and al, 0E0h .text:000014C2 .text:000014C2 loc_14C2: ; CODE XREF: EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+6Cj .text:000014C2 ; EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+72j ... .text:000014C2 mov [esi], al .text:000014C4 mov al, [ebp+arg_8] .text:000014C7 inc esi .text:000014C8 mov [esi], al .text:000014CA mov ax, [ebp+arg_C] .text:000014CE inc esi .text:000014CF mov [esi], al .text:000014D1 inc esi .text:000014D2 mov [esi], ah .text:000014D4 mov ax, [ebp+arg_10] .text:000014D8 inc esi .text:000014D9 mov [esi], al .text:000014DB inc esi .text:000014DC mov [esi], ah .text:000014DE inc esi .text:000014DF mov [esi], bl .text:000014E1 inc esi .text:000014E2 mov [esi], bh .text:000014E4 inc esi .text:000014E5 cmp [ebp+arg_20], 0 .text:000014E9 jz short loc_1506 .text:000014EB cmp [ebp+arg_4], 0 .text:000014EF jz short loc_1501 .text:000014F1 lea eax, [edi-8] .text:000014F4 push eax .text:000014F5 push [ebp+arg_4] .text:000014F8 push esi .text:000014F9 call _memcpy .text:000014FE add esp, 0Ch .text:00001501 .text:00001501 loc_1501: ; CODE XREF: EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+AFj .text:00001501 mov byte ptr [edi+esi-8], 0 .text:00001506 .text:00001506 loc_1506: ; CODE XREF: EncodeHostToDevice(char *,char *,ushort,ushort,ushort,ushort,int,int,bool)+A9j .text:00001506 mov ax, word ptr [ebp+arg_14] .text:0000150A pop edi .text:0000150B pop esi .text:0000150C pop ebx .text:0000150D pop ebp .text:0000150E retn 24h .text:0000150E ?EncodeHostToDevice@@YGGPAD0GGGGHH_N@Z endp ; sp = 0Ch .text:0000150E .text:0000150E _text ends .text:0000150E