Function at 0x403923
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, 0x9bc
mov eax, dword [0x414044]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x9b4], eax
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x808], ax
lea eax, [ebp - 0x806]
mov edi, ecx
push eax
mov dword [ebp - 0x9b8], edi
mov esi, edx
call fcn.0040ab80
add esp, 0xc
lea ebx, [ebp - 0x808]
test esi, esi
je 0x403976
mov ebx, esi
xor eax, eax
and dword [ebp - 0x9b0], eax
and dword [ebp - 0x9ac], eax
mov word [ebx], ax
lea eax, [ebp - 0x9a8]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4039eb
mov eax, 0x412cf4
mov edx, ebx
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
inc eax
inc eax
test cx, cx
jne 0x4039a6
mov edi, ebx
dec edi
dec edi
mov ax, word [edi + 2]
inc edi
inc edi
test ax, ax
jne 0x4039b8
dec ebx
mov esi, 0x412d14
dec ebx
movsd dword es:[edi], dword [esi]
mov edi, ebx
mov ax, word [edi + 2]
inc edi
inc edi
test ax, ax
jne 0x4039cd
push 0xf
pop ecx
mov esi, 0x412d18
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
jmp 0x403ada
push 6
push 1
push 2
pop esi
push esi
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x403a3d
mov eax, 0x412cf4
mov edx, ebx
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, esi
test cx, cx
jne 0x403a09
mov edi, ebx
dec edi
dec edi
mov ax, word [edi + 2]
add edi, esi
test ax, ax
jne 0x403a1b
dec ebx
mov esi, 0x412d14
dec ebx
movsd dword es:[edi], dword [esi]
mov edi, ebx
mov ax, word [edi + 2]
inc edi
inc edi
test ax, ax
jne 0x403a30
jmp 0x4039d8
push dword [ebp - 0x9b4]
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x403ae9
push dword [ebp - 0x9b4]
call dword [sym.imp.WS2_32.dll_inet_addr]
push esi
mov dword [ebp - 0x9b0], eax
push 4
lea eax, [ebp - 0x9b0]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
test eax, eax
jne 0x403ae9
mov eax, 0x412cf4
mov edx, ebx
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, esi
test cx, cx
jne 0x403a80
mov edi, ebx
dec edi
dec edi
mov ax, word [edi + 2]
add edi, esi
test ax, ax
jne 0x403a92
dec ebx
mov esi, 0x412d14
dec ebx
movsd dword es:[edi], dword [esi]
mov edi, ebx
mov ax, word [edi + 2]
inc edi
inc edi
test ax, ax
jne 0x403aa7
push 0xf
pop ecx
mov esi, 0x412d18
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0x9b8]
mov eax, dword [esi]
test eax, eax
je 0x403ad4
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
and dword [esi], 0
mov eax, dword [ebp - 0x9ac]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040430c
leave
ret
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
push dword [ebp + 0xc]
mov dword [ebp - 0x814], eax
mov eax, esi
mov word [ebp - 0x818], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x816], ax
push 0x10
lea eax, [ebp - 0x818]
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x403b64
mov eax, 0x412d58
mov edx, ebx
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, esi
test cx, cx
jne 0x403b2d
mov edi, ebx
dec edi
dec edi
mov ax, word [edi + 2]
add edi, esi
test ax, ax
jne 0x403b3f
dec ebx
mov esi, 0x412d14
dec ebx
movsd dword es:[edi], dword [esi]
mov edi, ebx
mov ax, word [edi + 2]
inc edi
inc edi
test ax, ax
jne 0x403b54
jmp 0x403ab2
mov dword [ebp - 0x9ac], 1
jmp 0x403ad4