Function at 0x408620
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
lea ebp, [esp - 0x1440]
mov eax, 0x1440
call fcn.0040c5b0
push 0xffffffffffffffff
push 0x41e4eb
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x425f70]
xor eax, ebp
mov dword [ebp + 0x143c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x144c]
mov ecx, dword [ebp + 0x1450]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 4], eax
mov dword [ebp + 0x1b8], 0xf
mov dword [ebp + 0x1b4], eax
mov byte [ebp + 0x1a4], al
fldz
mov dword [ebp - 0x48], eax
xor edx, edx
mov word [ebp - 0x2c], dx
xor ecx, ecx
mov word [ebp - 0x44], cx
mov word [ebp - 0x38], dx
mov dword [ebp - 0x1c], eax
fst qword [ebp - 0x34]
mov word [ebp - 0x40], ax
mov word [ebp - 0x20], cx
fstp qword [ebp - 0x50]
fldz
mov ebx, 1
fstp dword [ebp - 0x3c]
mov byte [ebp + 0x11bc], al
add dword [ebp - 0x38], ebx
fld dword [0x4235d4]
mov dx, word [ebp - 0x38]
fsubr qword [0x41f868]
movsx eax, dx
mov dword [ebp - 0x28], eax
mov byte [ebp - 4], bl
fild dword [ebp - 0x28]
fucompp
fnstsw ax
test ah, 0x44
jp 0x408731
fld qword [ebp - 0x50]
fadd qword [0x41f350]
fstp qword [ebp - 0x50]
fld qword [ebp - 0x50]
mov cx, word [ebp - 0x44]
movsx edx, cx
add edx, 0x14b0176f
mov dword [ebp - 0x28], edx
fild dword [ebp - 0x28]
fcompp
fnstsw ax
test ah, 5
jp 0x40873e
mov ax, word [0x425cb8]
mov ecx, dword [0x425d4c]
cwde
add ecx, eax
mov word [ebp - 0x20], cx
add dword [0x425d4c], ebx
jmp 0x40873e
dec dword [ebp - 0x2c]
mov dx, word [ebp - 0x2c]
movsx eax, dx
sub dword [ebp - 0x1c], eax
mov esi, dword [ebp + 0x1448]
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408750
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x408afc
xor eax, eax
cmp eax, edi
jg 0x4087cf
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x4087cb
mov byte [ebp + eax + 0x13bc], 0
add dword [ebp - 0x20], ebx
fld dword [0x425d64]
movzx ecx, word [ebp - 0x20]
movsx edx, cx
movzx ecx, word [ebp - 0x20]
movsx ecx, cx
add edx, ecx
mov dword [ebp - 0x28], edx
mov ecx, eax
fisub dword [ebp - 0x28]
fstp dword [0x425d64]
dec dword [ebp - 0x20]
jmp 0x4087b0
cmp ecx, edi
jg 0x4087cf
mov bl, byte [ecx + esi]
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
mov ebx, 1
add ecx, ebx
jmp 0x4087b0
add eax, ebx
jmp 0x408766
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4087d8
mov edi, dword [ebp - 0x14]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
jmp 0x4087f0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4087f0
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x408ae4
mov eax, edi
mov edx, edi
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408810
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408820
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [ebp - 0x40], ebx
movzx ecx, word [ebp - 0x40]
movzx edx, word [ebp - 0x2c]
movzx eax, word [ebp - 0x2c]
add ecx, edx
imul ecx, eax
push 5
push 0x425c00
mov word [ebp - 0x2c], cx
call fcn.00401d50
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408864
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407b70
fldz
xor eax, eax
xor edi, edi
mov dword [esi], eax
mov dword [ebp - 0x14], edi
fstp qword [ebp - 0x34]
push esi
mov byte [esi + 4], al
call fcn.0040b06b
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088a0
sub eax, edx
push eax
lea ecx, [ebp + 0x11bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00408250
push 0x32
push 0x425d08
call fcn.00401d50
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088d0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408250
fldz
push 0x32
push edi
mov dword [ebp - 0x14], edi
fstp qword [ebp - 0x34]
push esi
call fcn.0040b360
push esi
call fcn.0040b06b
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408910
sub eax, edx
push eax
lea edx, [ebp + 0x13bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00408250
mov eax, dword [ebp - 0x1c]
mov ecx, 0x892cf510
sub ecx, eax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
push 5
push 0x424204
fstp qword [ebp - 0x34]
add dword [ebp - 0x1c], ebx
call fcn.00401d50
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408956
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408250
mov edx, dword [0x425d60]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
xor eax, eax
push esi
fstp qword [0x4235f0]
dec dword [0x425d60]
fldz
mov dword [esi], eax
mov dword [ebp - 0x14], edi
fstp qword [ebp - 0x18]
mov byte [esi + 4], al
call fcn.0040b06b
add esp, 4
lea eax, [ebp]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x408efb
mov dx, word [ebp - 0x2c]
movsx eax, dx
add eax, 0x282cb6bf
mov dword [ebp - 0x14], eax
push 6
push ebx
fild dword [ebp - 0x14]
push 2
fmul qword [0x424dd8]
fstp qword [0x424dd8]
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x28], esi
cmp esi, 0xffffffff
jne 0x408a32
call sub.WS2_32.dll_WSACleanup
mov cx, word [0x425bf0]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fsub qword [ebp - 0x34]
fsub qword [0x41f860]
fld qword [ebp - 0x34]
add word [0x425bf0], bx
fcompp
fnstsw ax
test ah, 0x41
jne 0x408a27
movzx eax, word [ebp - 0x44]
add eax, 0x493f3a88
mov word [ebp - 0x20], ax
jmp 0x408efb
fld qword [0x41f858]
jmp 0x408ef8
fld qword [0x425c50]
fadd qword [0x41f850]
fmul qword [0x425c28]
fstp qword [0x425c28]
fld qword [0x425c50]
fadd qword [0x41f350]
fstp qword [0x425c50]
cmp dword [ebp + 0x1458], edi
je 0x408a8b
movzx edx, word [ebp - 0x38]
push 4
lea eax, [ebp + 0x1458]
push eax
push 0x1006
push 0xffff
sub edx, 0x140330fc
push esi
mov word [ebp - 0x38], dx
call sub.WS2_32.dll_setsockopt
lea ecx, [ebp + 0x13bc]
push ecx
call sub.WS2_32.dll_gethostbyname
cmp eax, edi
jne 0x408b21
fld dword [0x4230b0]
fsub qword [ebp - 0x34]
fsub qword [0x4259f0]
fld qword [ebp - 0x34]
fsub qword [0x41f848]
fcompp
fnstsw ax
fld qword [ebp - 0x34]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [ebp - 0x34]
fadd dword [0x4230b0]
fstp dword [0x4230b0]
test ah, 1
jne 0x408ae4
mov edx, dword [ebp - 0x1c]
imul edx, edx, 0x35c888e1
mov dword [ebp - 0x1c], edx
cmp dword [ebp + 0x1b8], 0x10
jb 0x408afc
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040ac7e
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x143c]
xor ecx, ebp
call fcn.0040b296
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
mov ecx, 2
mov word [ebp + 0x190], cx
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
call sub.WS2_32.dll_inet_ntoa
push eax
call sub.WS2_32.dll_inet_addr
mov edx, dword [0x425c9c]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
mov dword [ebp + 0x194], eax
fld dword [0x4242b8]
push 0x50
faddp st(1)
fsubr qword [ebp - 0x50]
fstp qword [ebp - 0x50]
fld dword [0x4242b8]
fadd qword [0x41f350]
fstp dword [0x4242b8]
call sub.WS2_32.dll_htons
mov word [ebp + 0x192], ax
mov edi, 0x10
push edi
lea eax, [ebp + 0x190]
push eax
push esi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x408ba3
cmp dword [ebp + 0x1b8], edi
jmp 0x408f02
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408bb7
lea eax, [ebp + 0x1a4]
mov edx, dword [ebp + 0x1b4]
push 0
push edx
push eax
push esi
call sub.WS2_32.dll_send
fld qword [0x425a18]
fsub qword [0x41f840]
fstp qword [0x425a18]
cmp eax, dword [ebp + 0x1b4]
jae 0x408bec
cmp dword [ebp + 0x1b8], edi
jmp 0x408aeb
mov ecx, dword [ebp - 0x24]
push 0
push 0x41f838
call fcn.00407b70
or edi, 0xffffffff
or ebx, edi
mov edx, dword [ebp - 0x28]
push 0
push 0x1000
lea ecx, [ebp + 0x1bc]
push ecx
push edx
call sub.WS2_32.dll_recv
test eax, eax
jle 0x408def
mov ecx, dword [ebp - 0x24]
push eax
lea eax, [ebp + 0x1bc]
push eax
call fcn.00408250
test edi, edi
jge 0x408d63
movzx ecx, word [ebp - 0x20]
imul ecx, ecx, 0x8f9dbca8
push 5
push 0x424204
mov word [ebp - 0x20], cx
call fcn.00401d50
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408c60
mov ecx, dword [ebp - 0x24]
sub eax, edx
push eax
push 0
push esi
call fcn.00404f20
fldz
mov edi, eax
xor eax, eax
mov dword [ebp - 0x14], eax
fstp qword [ebp - 0x18]
mov dword [esi], eax
push esi
mov byte [esi + 4], al
call fcn.0040b06b
add esp, 4
test edi, edi
jl 0x408d63
mov edx, dword [ebp - 0x24]
push edx
add edi, 4
call fcn.00406a40
mov ebx, eax
add esp, 4
mov dword [ebp - 0x38], ebx
test ebx, ebx
jge 0x408d51
push 0xb
push 0x424d8c
call fcn.00401d50
mov esi, eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x1c]
add esp, 8
lea edx, [ecx + eax - 0x1f4bfb54]
mov ecx, dword [ebp - 0x24]
push 0
push esi
mov dword [ebp - 0x1c], edx
call fcn.004052d0
push esi
push 0xb
mov ebx, eax
call fcn.004022a0
add esp, 8
test ebx, ebx
jge 0x408def
fld dword [0x425cf8]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x425cf8]
fld dword [ebp - 0x3c]
fsub st(1)
fstp dword [ebp - 0x3c]
fld qword [0x424db8]
fsub st(1)
fstp qword [0x424db8]
fld dword [0x425cf8]
fadd dword [ebp - 0x3c]
fadd qword [0x424db8]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b2b0
mov ebx, dword [ebp - 0x38]
mov dword [ebp - 0x1c], eax
movzx ecx, word [ebp - 0x40]
sub ecx, 0x6e7a7902
mov word [ebp - 0x40], cx
jmp 0x408d65
movzx ecx, word [ebp - 0x40]
fld1
sub ecx, 0x6e7a7902
mov word [ebp - 0x40], cx
jmp 0x408d65
fld1
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fsub qword [0x425c40]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b2b0
mov dword [ebp - 0x1c], eax
test ebx, ebx
jl 0x408d97
mov ecx, dword [ebp - 0x24]
mov eax, dword [ecx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x408ded
fld dword [0x423528]
fadd st(1)
fstp dword [0x423528]
mov dx, word [0x4235cc]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fsub dword [0x423528]
fadd dword [ebp - 0x3c]
call fcn.0040b2b0
mov dword [0x423510], eax
fadd dword [ebp - 0x3c]
cmp dword [ebp + 0x1458], 0
fstp dword [ebp - 0x3c]
je 0x408c00
mov ecx, dword [ebp - 0x24]
cmp dword [ecx + 0x14], 0x4000
jb 0x408c00
jmp 0x408def
fstp st(0)
mov edx, dword [ebp - 0x28]
push edx
call sub.WS2_32.dll_closesocket
dec word [0x425d40]
mov ax, word [0x425d40]
movzx ecx, word [ebp - 0x20]
cwde
sub ecx, eax
mov word [ebp - 0x20], cx
call sub.WS2_32.dll_WSACleanup
test edi, edi
jl 0x408e28
push edi
mov edi, dword [ebp - 0x24]
push 0
mov ecx, edi
call fcn.00405240
jmp 0x408e2b
mov edi, dword [ebp - 0x24]
mov bl, byte [ebp + 0x1454]
test bl, bl
je 0x408efb
xor esi, esi
jmp 0x408e40
cmp esi, dword [edi + 0x14]
jae 0x408ece
cmp dword [edi + 0x18], 0x10
jb 0x408e54
mov eax, dword [edi + 4]
jmp 0x408e57
lea eax, [edi + 4]
xor byte [eax + esi], bl
mov dx, word [0x425bd8]
mov ecx, dword [0x424230]
movsx eax, dx
mov edx, dword [ebp - 0x48]
sub ecx, 0x1a373619
mov dword [ebp - 0x14], ecx
lea eax, [edx + eax + 0x16c0e5d6]
fild dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fld dword [0x4235f8]
dec dword [ebp - 0x48]
fsubp st(2)
fcompp
fnstsw ax
test ah, 1
jne 0x408eac
fld dword [0x424d9c]
inc esi
fsub qword [ebp - 0x50]
fstp dword [0x424d9c]
jmp 0x408e40
mov ecx, dword [0x425a98]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fsub qword [0x4241f0]
call fcn.0040b2b0
mov dword [0x425a98], eax
inc esi
jmp 0x408e40
fld qword [ebp - 0x34]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [ebp - 0x34]
mov dx, word [ebp - 0x2c]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd qword [ebp - 0x34]
fadd qword [ebp - 0x34]
call fcn.0040b2b0
mov dword [ebp - 0x1c], eax
fsubr qword [ebp - 0x34]
fstp qword [ebp - 0x34]
cmp dword [ebp + 0x1b8], 0x10
jb 0x408afc
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x408af4