Function at 0x404890
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa44
mov eax, dword [0x432070]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
push edi
mov dword [ebp - 0x9c4], ecx
xor eax, eax
mov word [ebp - 0x9c0], ax
push 0x7fe
push 0
lea ecx, [ebp - 0x9be]
push ecx
call fcn.00418590
add esp, 0xc
lea edx, [ebp - 0x9c0]
mov dword [ebp - 0x19c], edx
cmp dword [ebp + 0x14], 0
je 0x4048e5
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x19c], eax
xor ecx, ecx
mov edx, dword [ebp - 0x19c]
mov word [edx], cx
mov dword [ebp - 0x1bc], 0
mov dword [ebp - 0x1b8], 0
mov dword [ebp - 0x1b4], 0
lea eax, [ebp - 0x198]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x404a21
mov dword [ebp - 0x9c8], 0x42ec48
mov ecx, dword [ebp - 0x19c]
mov dword [ebp - 0x9cc], ecx
mov edx, dword [ebp - 0x9cc]
mov dword [ebp - 0x9d0], edx
mov eax, dword [ebp - 0x9c8]
mov cx, word [eax]
mov word [ebp - 0x9d2], cx
mov edx, dword [ebp - 0x9cc]
mov ax, word [ebp - 0x9d2]
mov word [edx], ax
mov ecx, dword [ebp - 0x9c8]
add ecx, 2
mov dword [ebp - 0x9c8], ecx
mov edx, dword [ebp - 0x9cc]
add edx, 2
mov dword [ebp - 0x9cc], edx
cmp word [ebp - 0x9d2], 0
jne 0x40494f
mov eax, dword [ebp - 0x19c]
add eax, 0xfffffffe
mov dword [ebp - 0x9d8], eax
mov ecx, dword [ebp - 0x9d8]
mov dx, word [ecx + 2]
mov word [ebp - 0x9da], dx
add dword [ebp - 0x9d8], 2
cmp word [ebp - 0x9da], 0
jne 0x4049a6
mov edi, dword [ebp - 0x9d8]
mov eax, dword [0x42ec68]
mov dword [edi], eax
mov ecx, dword [ebp - 0x19c]
add ecx, 0xfffffffe
mov dword [ebp - 0x9e0], ecx
mov edx, dword [ebp - 0x9e0]
mov ax, word [edx + 2]
mov word [ebp - 0x9e2], ax
add dword [ebp - 0x9e0], 2
cmp word [ebp - 0x9e2], 0
jne 0x4049e4
mov edi, dword [ebp - 0x9e0]
mov ecx, 0xf
mov esi, 0x42ec6c
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
jmp 0x404dee
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov edx, dword [ebp + 0x10]
cmp dword [edx], 0xffffffff
jne 0x404b33
mov dword [ebp - 0x9e8], 0x42ecac
mov eax, dword [ebp - 0x19c]
mov dword [ebp - 0x9ec], eax
mov ecx, dword [ebp - 0x9ec]
mov dword [ebp - 0x9f0], ecx
mov edx, dword [ebp - 0x9e8]
mov ax, word [edx]
mov word [ebp - 0x9f2], ax
mov ecx, dword [ebp - 0x9ec]
mov dx, word [ebp - 0x9f2]
mov word [ecx], dx
mov eax, dword [ebp - 0x9e8]
add eax, 2
mov dword [ebp - 0x9e8], eax
mov ecx, dword [ebp - 0x9ec]
add ecx, 2
mov dword [ebp - 0x9ec], ecx
cmp word [ebp - 0x9f2], 0
jne 0x404a60
mov edx, dword [ebp - 0x19c]
add edx, 0xfffffffe
mov dword [ebp - 0x9f8], edx
mov eax, dword [ebp - 0x9f8]
mov cx, word [eax + 2]
mov word [ebp - 0x9fa], cx
add dword [ebp - 0x9f8], 2
cmp word [ebp - 0x9fa], 0
jne 0x404ab7
mov edi, dword [ebp - 0x9f8]
mov edx, dword [0x42eccc]
mov dword [edi], edx
mov eax, dword [ebp - 0x19c]
add eax, 0xfffffffe
mov dword [ebp - 0xa00], eax
mov ecx, dword [ebp - 0xa00]
mov dx, word [ecx + 2]
mov word [ebp - 0xa02], dx
add dword [ebp - 0xa00], 2
cmp word [ebp - 0xa02], 0
jne 0x404af6
mov edi, dword [ebp - 0xa00]
mov ecx, 0xf
mov esi, 0x42ecd0
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
jmp 0x404dee
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x1b0], eax
cmp dword [ebp - 0x1b0], 0
jne 0x404b73
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x1bc], eax
push 2
push 4
lea edx, [ebp - 0x1bc]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
mov dword [ebp - 0x1b0], eax
cmp dword [ebp - 0x1b0], 0
jne 0x404c78
mov dword [ebp - 0xa08], 0x42ed10
mov eax, dword [ebp - 0x19c]
mov dword [ebp - 0xa0c], eax
mov ecx, dword [ebp - 0xa0c]
mov dword [ebp - 0xa10], ecx
mov edx, dword [ebp - 0xa08]
mov ax, word [edx]
mov word [ebp - 0xa12], ax
mov ecx, dword [ebp - 0xa0c]
mov dx, word [ebp - 0xa12]
mov word [ecx], dx
mov eax, dword [ebp - 0xa08]
add eax, 2
mov dword [ebp - 0xa08], eax
mov ecx, dword [ebp - 0xa0c]
add ecx, 2
mov dword [ebp - 0xa0c], ecx
cmp word [ebp - 0xa12], 0
jne 0x404ba2
mov edx, dword [ebp - 0x19c]
add edx, 0xfffffffe
mov dword [ebp - 0xa18], edx
mov eax, dword [ebp - 0xa18]
mov cx, word [eax + 2]
mov word [ebp - 0xa1a], cx
add dword [ebp - 0xa18], 2
cmp word [ebp - 0xa1a], 0
jne 0x404bf9
mov edi, dword [ebp - 0xa18]
mov edx, dword [0x42ed30]
mov dword [edi], edx
mov eax, dword [ebp - 0x19c]
add eax, 0xfffffffe
mov dword [ebp - 0xa20], eax
mov ecx, dword [ebp - 0xa20]
mov dx, word [ecx + 2]
mov word [ebp - 0xa22], dx
add dword [ebp - 0xa20], 2
cmp word [ebp - 0xa22], 0
jne 0x404c38
mov edi, dword [ebp - 0xa20]
mov ecx, 0xf
mov esi, 0x42ed34
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp 0x404dc2
mov eax, dword [ebp - 0x1b0]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [ebp - 0x1a8], eax
mov ecx, 2
mov word [ebp - 0x1ac], cx
movzx edx, word [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1aa], ax
push 0x10
lea eax, [ebp - 0x1ac]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x404db8
mov dword [ebp - 0xa28], 0x42ed74
mov eax, dword [ebp - 0x19c]
mov dword [ebp - 0xa2c], eax
mov ecx, dword [ebp - 0xa2c]
mov dword [ebp - 0xa30], ecx
mov edx, dword [ebp - 0xa28]
mov ax, word [edx]
mov word [ebp - 0xa32], ax
mov ecx, dword [ebp - 0xa2c]
mov dx, word [ebp - 0xa32]
mov word [ecx], dx
mov eax, dword [ebp - 0xa28]
add eax, 2
mov dword [ebp - 0xa28], eax
mov ecx, dword [ebp - 0xa2c]
add ecx, 2
mov dword [ebp - 0xa2c], ecx
cmp word [ebp - 0xa32], 0
jne 0x404ce8
mov edx, dword [ebp - 0x19c]
add edx, 0xfffffffe
mov dword [ebp - 0xa38], edx
mov eax, dword [ebp - 0xa38]
mov cx, word [eax + 2]
mov word [ebp - 0xa3a], cx
add dword [ebp - 0xa38], 2
cmp word [ebp - 0xa3a], 0
jne 0x404d3f
mov edi, dword [ebp - 0xa38]
mov edx, dword [0x42ed94]
mov dword [edi], edx
mov eax, dword [ebp - 0x19c]
add eax, 0xfffffffe
mov dword [ebp - 0xa40], eax
mov ecx, dword [ebp - 0xa40]
mov dx, word [ecx + 2]
mov word [ebp - 0xa42], dx
add dword [ebp - 0xa40], 2
cmp word [ebp - 0xa42], 0
jne 0x404d7e
mov edi, dword [ebp - 0xa40]
mov ecx, 0xf
mov esi, 0x42ed98
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp 0x404dc2
mov dword [ebp - 0x1b8], 1
cmp dword [ebp - 0x1b8], 0
jne 0x404de8
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
je 0x404de8
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov eax, dword [ebp - 0x1b8]
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004167a0
mov esp, ebp
pop ebp
ret 0x10