Function at 0x404a00
Capabilities:
Connect socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42d561
mov eax, dword fs:[0]
push eax
sub esp, 0x204
mov eax, dword [0x439654]
xor eax, esp
mov dword [esp + 0x1fc], eax
push esi
push edi
mov eax, dword [0x439654]
xor eax, esp
push eax
lea eax, [esp + 0x210]
mov dword fs:[0], eax
mov edx, dword [ebx + 0x24]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404a47
sub eax, esi
je 0x404c4b
mov eax, edx
lea edx, [eax + 1]
jmp 0x404a60
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404a60
sub eax, edx
inc eax
cmp eax, 0x800
ja 0x404c4b
mov ecx, ebx
call fcn.00404680
mov edi, dword [ebx + 0x34]
xor esi, esi
mov eax, edi
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], esi
mov byte [esp + 0x2c], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404a97
sub eax, edx
push eax
push edi
lea ecx, [esp + 0x34]
call fcn.00403150
or eax, 0xffffffff
mov dword [esp + 0x218], esi
cmp dword [ebx + 0x2c], eax
je 0x404ad5
cmp dword [esp + 0x40], 0x10
jb 0x404ace
mov eax, dword [esp + 0x2c]
push eax
call fcn.004176d5
add esp, 4
mov al, 1
jmp 0x404c4d
lea ecx, [esp + 0x74]
push ecx
push 0x101
mov dword [ebx + 0x2c], eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp eax, esi
je 0x404af9
push str.WSAStartup_error
call fcn.00417e95
add esp, 4
push esi
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx + 0x2c], eax
cmp eax, esi
jl 0x404c42
mov dword [esp + 0x24], esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], 0x50
mov dword [esp + 0x10], esi
mov byte [esp + 0x218], 1
mov eax, dword [ebx + 0x24]
lea ecx, [esp + 0xc]
call fcn.00408cd0
cmp dword [esp + 0x20], esi
jl 0x404c39
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x404c39
push eax
lea ecx, [esp + 0x5c]
call fcn.00403060
mov ecx, 0x4313f3
lea edi, [esp + 0x58]
mov byte [esp + 0x218], 2
call fcn.004059a0
test al, al
jne 0x404c30
xor eax, eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x20]
mov edx, 2
push eax
mov word [esp + 0x4c], dx
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [esp + 0x6c], 0x10
mov word [esp + 0x4a], ax
mov eax, dword [esp + 0x58]
jae 0x404bba
mov eax, edi
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, esi
je 0x404c29
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
push ecx
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.004199f0
mov eax, dword [ebx + 0x2c]
add esp, 0xc
push 0x10
lea edx, [esp + 0x4c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, esi
jne 0x404c11
lea ecx, [esp + 0x58]
call fcn.004030a0
lea esi, [esp + 0xc]
call fcn.00408d40
lea ecx, [esp + 0x2c]
call fcn.004030a0
mov al, 1
jmp 0x404c4d
jge 0x404c1d
call fcn.00418181
cmp dword [eax], 0x70
jne 0x404c29
mov esi, dword [ebx + 0x2c]
call fcn.00404030
test eax, eax
jg 0x404bf2
mov esi, ebx
call fcn.00404d00
lea ecx, [esp + 0x58]
call fcn.004030a0
lea esi, [esp + 0xc]
call fcn.00408d40
lea ecx, [esp + 0x2c]
call fcn.004030a0
xor al, al
mov ecx, dword [esp + 0x210]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x1fc]
xor ecx, esp
call fcn.00417619
mov esp, ebp
pop ebp
ret