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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42bef1
mov eax, dword fs:[0]
push eax
sub esp, 0x204
mov eax, dword [0x437654]
xor eax, esp
mov dword [esp + 0x1fc], eax
push ebx
push esi
mov eax, dword [0x437654]
xor eax, esp
push eax
lea eax, [esp + 0x210]
mov dword fs:[0], eax
mov edx, dword [edi + 0x24]
mov eax, edx
lea esi, [eax + 1]
xor ebx, ebx
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x404e10
sub eax, esi
je 0x405007
mov eax, edx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x404e24
sub eax, edx
inc eax
cmp eax, 0x800
ja 0x405007
mov ecx, edi
call fcn.00404a40
mov esi, dword [edi + 0x34]
mov eax, esi
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x404e58
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x34]
call fcn.00403670
or eax, 0xffffffff
mov dword [esp + 0x218], ebx
cmp dword [edi + 0x2c], eax
je 0x404e96
cmp dword [esp + 0x40], 0x10
jb 0x404e8f
mov eax, dword [esp + 0x2c]
push eax
call fcn.0041784c
add esp, 4
mov al, 1
jmp 0x405009
lea ecx, [esp + 0x74]
push ecx
push 0x101
mov dword [edi + 0x2c], eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp eax, ebx
je 0x404eba
push str.WSAStartup_error
call fcn.00418015
add esp, 4
push ebx
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi + 0x2c], eax
cmp eax, ebx
jl 0x404ffe
mov dword [esp + 0x24], ebx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], 0x50
mov dword [esp + 0x10], ebx
mov byte [esp + 0x218], 1
mov eax, dword [edi + 0x24]
lea ecx, [esp + 0xc]
call fcn.00408c00
mov esi, dword [esp + 0x20]
cmp esi, ebx
jl 0x404ff5
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x404ff5
push eax
lea ecx, [esp + 0x5c]
call fcn.00403580
lea eax, [esp + 0x58]
mov byte [esp + 0x218], 2
call fcn.00405df0
test al, al
jne 0x404fec
xor eax, eax
mov edx, 2
mov dword [esp + 0x48], eax
push esi
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], 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 0x404f76
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
je 0x404fe5
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.00419960
mov eax, dword [edi + 0x2c]
add esp, 0xc
push 0x10
lea edx, [esp + 0x4c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, ebx
jne 0x404fcd
lea ecx, [esp + 0x58]
call fcn.004035c0
lea esi, [esp + 0xc]
call fcn.00408c70
lea ecx, [esp + 0x2c]
call fcn.004035c0
mov al, 1
jmp 0x405009
jge 0x404fd9
call fcn.00418301
cmp dword [eax], 0x70
jne 0x404fe5
mov esi, dword [edi + 0x2c]
call fcn.004043f0
test eax, eax
jg 0x404fae
mov esi, edi
call fcn.004050c0
lea ecx, [esp + 0x58]
call fcn.004035c0
lea esi, [esp + 0xc]
call fcn.00408c70
lea ecx, [esp + 0x2c]
call fcn.004035c0
xor al, al
mov ecx, dword [esp + 0x210]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [esp + 0x1fc]
xor ecx, esp
call fcn.00417790
mov esp, ebp
pop ebp
ret