Function at 0x4016c0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fa720
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1ac
push ebx
push esi
push edi
lea eax, [ebp - 0x1b8]
mov dword [ebp - 0x10], esp
xor ebx, ebx
push eax
push 0x202
mov dword [ebp - 4], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x401725
push str.WSAStartup_error__n
call fcn.004f172e
add esp, 4
mov ecx, dword [ebp + 0x18]
mov dword [ecx], ebx
xor ax, ax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.iphlpapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x28], edi
jne 0x401740
mov edx, dword [ebp + 0x18]
mov dword [edx], ebx
jmp 0x401711
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.AllocateAndGetTcpExTableFromStack
push edi
call esi
push str.AllocateAndGetUdpExTableFromStack
push edi
mov dword [0x53155c], eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 2
push 2
mov dword [0x531560], eax
mov byte [ebp - 4], 1
call esi
push eax
lea eax, [ebp - 0x14]
push 1
push eax
call dword [0x53155c]
cmp eax, ebx
je 0x40179a
push str.AllocateAndGetTcpExTableFromStack_Error__n
call fcn.004f172e
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40170c
push 2
push 2
call esi
push eax
lea edx, [ebp - 0x20]
push 1
push edx
call dword [0x531560]
cmp eax, ebx
je 0x4017df
push str.AllocateAndGetUdpExTableFromStack_Error_._n
call fcn.004f172e
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp + 0x18]
mov dword [eax], ebx
or ax, 0xffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
xor esi, esi
mov dword [ebp - 0x18], esi
mov ecx, dword [eax]
mov dword [ebp - 0x24], ecx
cmp esi, dword [eax]
jae 0x401ebc
lea edi, [esi + esi*2]
shl edi, 3
mov dword [ebp - 0x1c], edi
mov dx, word [edi + eax + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x15
jne 0x40187e
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0x15
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d540
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dx, word [edi + ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x17
jne 0x401902
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0x17
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d530
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dx, word [edi + ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x19
jne 0x401986
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0x19
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d520
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dx, word [edi + ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x35
jne 0x401a0a
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0x35
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d514
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dx, word [edi + ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x50
jne 0x401a8e
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0x50
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d508
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dx, word [edi + ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x87
jne 0x401b12
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0x87
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d4fc
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dx, word [edi + ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x8b
jne 0x401b96
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0x8b
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d4e8
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dx, word [edi + ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x1bb
jne 0x401c1a
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0x1bb
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d4d4
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dx, word [edi + ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x1bd
jne 0x401c9e
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0x1bd
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d4e8
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dx, word [edi + ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x203
jne 0x401d22
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0x1bd
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d4c4
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dx, word [edi + ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x599
jne 0x401da6
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0x599
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, str.SQL_SERVER
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dx, word [edi + ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0xd3d
jne 0x401e2a
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0xd3d
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d4a4
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dx, word [edi + ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x1388
jne 0x401eab
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x14]
mov dword [ecx + ebx*4], 0x1388
mov ecx, dword [eax + edx*8]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, str.UPNP
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x18]
cmp ebx, 0x40
je 0x401ebc
mov eax, dword [ebp - 0x14]
inc esi
mov dword [ebp - 0x18], esi
jmp 0x4017ec
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov ecx, dword [eax]
add edx, ecx
xor esi, esi
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x18], esi
cmp esi, dword [eax]
jae 0x4020fa
lea edi, [esi + esi*2]
shl edi, 2
mov dword [ebp - 0x1c], edi
mov dx, word [edi + eax + 8]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x45
jne 0x401f60
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x20]
mov dword [ecx + ebx*4], 0x45
mov ecx, dword [eax + edx*4]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d484
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
mov dx, word [edi + ecx + 8]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0xa1
jne 0x401fe4
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x20]
mov dword [ecx + ebx*4], 0xa1
mov ecx, dword [eax + edx*4]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d474
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
mov dx, word [edi + ecx + 8]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x202
jne 0x402068
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x20]
mov dword [ecx + ebx*4], 0x202
mov ecx, dword [eax + edx*4]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d460
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
mov dx, word [edi + ecx + 8]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x5e8
jne 0x4020e9
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea edx, [esi + esi*2 + 3]
mov word [eax + ebx*2], 1
mov eax, dword [ebp - 0x20]
mov dword [ecx + ebx*4], 0x5e8
mov ecx, dword [eax + edx*4]
push ecx
call fcn.004015d0
mov ecx, dword [ebp + 0x10]
mov edx, ebx
shl edx, 8
push eax
add edx, ecx
push 0x50d39c
push edx
call fcn.004f175f
mov ecx, dword [ebp + 0x14]
mov edx, ebx
shl edx, 5
add edx, ecx
mov edi, 0x50d450
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x18]
cmp ebx, 0x40
je 0x4020fa
mov eax, dword [ebp - 0x20]
inc esi
mov dword [ebp - 0x18], esi
jmp 0x401ece
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 0x28]
push edx
mov dword [ecx], ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 0xc]
mov ax, word [ebp - 0x24]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret