Function at 0x4085b0
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.0040c340
push 0xffffffffffffffff
push 0x41e25b
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x426110]
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]
xor esi, esi
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x34], ecx
mov dword [ebp - 4], esi
mov dword [ebp + 0x1b8], 0xf
mov dword [ebp + 0x1b4], esi
mov byte [ebp + 0x1a4], 0
fldz
mov ebx, dword [ebp + 0x1448]
mov dword [ebp - 0x40], esi
fstp dword [ebp - 0x14]
fldz
mov dword [ebp - 0x24], esi
xor edx, edx
mov word [ebp - 0x30], dx
mov dword [ebp - 0x14], esi
xor eax, eax
mov dword [ebp - 0x38], esi
mov word [ebp - 0x1c], ax
xor ecx, ecx
mov word [ebp - 0x2c], cx
mov byte [ebp + 0x11bc], al
mov eax, ebx
mov dword [ebp - 0x20], esi
fstp qword [ebp - 0x48]
lea edi, [esi + 1]
mov byte [ebp - 4], 1
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408661
sub eax, edx
mov ecx, eax
cmp ecx, 0x7f
mov dword [ebp - 0x14], ecx
jg 0x408a0d
cmp esi, ecx
jg 0x408754
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
lea edx, [eax + edx + 0x2f61adbe]
mov dword [ebp - 0x24], edx
add dword [ebp - 0x20], edi
mov al, byte [esi + ebx]
mov byte [ebp + esi + 0x13bc], al
cmp al, 0x2f
jne 0x408749
mov ax, word [ebp - 0x30]
movsx ecx, ax
mov dword [ebp - 0x28], ecx
mov byte [ebp + esi + 0x13bc], 0
fild dword [ebp - 0x28]
fsub dword [str.aHf_nJ]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x28], edx
fild dword [ebp - 0x28]
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
fsubp st(2)
fsubrp st(1)
call fcn.0040b030
mov dword [ebp - 0x20], eax
inc dword [ebp - 0x38]
fld dword [str.aHf_nJ]
fld1
mov edi, esi
fadd st(1), st(0)
fxch st(1)
fstp dword [str.aHf_nJ]
fld qword [0x41f8f0]
cmp edi, dword [ebp - 0x14]
jg 0x408750
fld qword [0x423e50]
mov dl, byte [edi + ebx]
fsub st(2)
mov ecx, edi
sub ecx, esi
mov byte [ebp + ecx + 0x11bc], dl
fstp qword [0x423e50]
fld qword [0x423e50]
mov ax, word [ebp - 0x1c]
movsx ecx, ax
mov dword [ebp - 0x28], ecx
fild dword [ebp - 0x28]
fld dword [0x424068]
fsubp st(2)
fxch st(1)
fsub st(2)
fsubp st(1)
call fcn.0040b030
mov word [ebp - 0x1c], ax
inc edi
jmp 0x4086fb
add esi, edi
jmp 0x408678
fstp st(1)
fstp st(0)
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408760
sub eax, edx
mov edx, eax
mov eax, dword [ebp - 0x3c]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408771
sub eax, esi
add eax, edx
cmp eax, 0x1ff
jbe 0x40879c
cmp dword [ebp + 0x1b8], 0x10
jb 0x408a0d
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x408a05
mov eax, dword [ebp - 0x3c]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4087a1
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4087b1
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 5
push 0x425580
rep movsb byte es:[edi], byte [esi]
call fcn.00402370
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4087e0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408390
fldz
movzx eax, word [ebp - 0x1c]
mov ecx, dword [ebp - 0x38]
mov edx, dword [0x4240e0]
sub eax, ecx
sub eax, edx
mov word [ebp - 0x1c], ax
xor eax, eax
xor ebx, ebx
fstp qword [ebp - 0x18]
mov dword [esi], eax
mov dword [ebp - 0x14], ebx
push esi
mov byte [esi + 4], al
call fcn.0040ae7f
movzx eax, word [ebp - 0x1c]
mov ecx, dword [0x423c50]
mov edx, dword [0x4240e0]
cwde
sub eax, ecx
add eax, 0xe415badb
add edx, eax
mov word [ebp - 0x1c], dx
mov edi, 1
lea eax, [ebp + 0x11bc]
add esp, 4
add dword [0x4240e0], edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408857
sub eax, edx
push eax
lea eax, [ebp + 0x11bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.00408470
dec dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fadd qword [ebp - 0x48]
mov edx, dword [0x424970]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
faddp st(1)
fcomp qword [0x41f8e8]
fnstsw ax
test ah, 5
jp 0x4088b9
mov eax, dword [ebp - 0x24]
sub eax, 0x178e355e
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd qword [0x423ce0]
fmul qword [ebp - 0x48]
fstp qword [ebp - 0x48]
jmp 0x4088c7
movzx ecx, word [ebp - 0x30]
add ecx, 0x2930cd9f
mov word [ebp - 0x30], cx
push 0x32
push 0x42484c
call fcn.00402370
dec dword [ebp - 0x24]
mov dx, word [ebp - 0x30]
mov esi, eax
movsx eax, dx
mov ecx, 0x5e1e46e6
sub ecx, eax
add ecx, dword [ebp - 0x24]
mov eax, esi
add esp, 8
mov dword [ebp - 0x24], ecx
add dword [ebp - 0x30], edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088f7
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408470
fldz
push 0x32
fstp qword [ebp - 0x18]
push ebx
push esi
mov dword [ebp - 0x14], ebx
call fcn.0040b450
push esi
call fcn.0040ae7f
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408930
sub eax, edx
push eax
lea edx, [ebp + 0x13bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00408470
push 5
push 0x423ca0
call fcn.00402370
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408960
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408470
fldz
xor eax, eax
fstp qword [ebp - 0x18]
mov dword [esi], eax
push esi
mov dword [ebp - 0x14], ebx
mov byte [esi + 4], al
call fcn.0040ae7f
add esp, 4
lea eax, [ebp]
push eax
push 0x202
call fcn.0040a79e
test eax, eax
jne 0x4089f5
fld dword [0x423f48]
mov dx, word [ebp - 0x2c]
fsubr qword [0x41f8e0]
dec dword [ebp - 0x2c]
movsx eax, dx
sub eax, 0xdc25f74
fsub qword [0x41f8d8]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fcompp
fnstsw ax
test ah, 1
jne 0x4089dc
fld qword [0x41f8d0]
fstp qword [0x423fa0]
push 6
push edi
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x20], esi
cmp esi, 0xffffffff
jne 0x408a32
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x408a0d
mov ecx, dword [ebp + 0x1a4]
push ecx
call fcn.0040aa0e
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.0040b4ca
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x1458], ebx
je 0x408a53
push 4
lea edx, [ebp + 0x1458]
push edx
push 0x1006
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
lea eax, [ebp + 0x13bc]
push eax
call fcn.0040a786
cmp eax, ebx
je 0x4089f5
mov edx, 2
mov word [ebp + 0x190], dx
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
push edx
call sub.WS2_32.dll_inet_ntoa
push eax
call sub.WS2_32.dll_inet_addr
fld dword [0x4256a0]
fadd qword [0x41f8c8]
mov dword [ebp + 0x194], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b030
mov dword [ebp - 0x38], eax
fld dword [0x4256a0]
fadd qword [0x41f348]
push 0x50
fstp dword [0x4256a0]
call fcn.0040a774
mov ebx, 0x10
push ebx
lea ecx, [ebp + 0x190]
push ecx
push esi
mov word [ebp + 0x192], ax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x408aea
cmp dword [ebp + 0x1b8], ebx
jmp 0x40878a
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], ebx
jae 0x408afe
lea eax, [ebp + 0x1a4]
mov ecx, dword [ebp + 0x1b4]
push 0
push ecx
push eax
push esi
call sub.WS2_32.dll_send
fld dword [0x425fe4]
fadd qword [0x41f348]
mov edi, eax
fstp dword [0x425fe4]
fld dword [0x425fe4]
mov dx, word [ebp - 0x30]
movsx eax, dx
fstp dword [ebp - 0x28]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd dword [ebp - 0x28]
call fcn.0040b030
mov word [ebp - 0x30], ax
cmp edi, dword [ebp + 0x1b4]
jae 0x408b57
cmp dword [ebp + 0x1b8], ebx
jmp 0x4089fc
movzx edx, word [0x425640]
mov ecx, dword [ebp - 0x34]
imul edx, edx, 0x1b541575
push 0
mov word [0x425640], dx
push 0x41f8c0
call fcn.00408390
or edi, 0xffffffff
fld qword [0x41f8b8]
mov dword [ebp - 0x3c], edi
fstp qword [0x4230e8]
lea esp, [esp]
push 0
push 0x1000
lea eax, [ebp + 0x1bc]
push eax
push esi
call sub.WS2_32.dll_recv
mov cx, word [0x42561c]
movsx ecx, cx
add ecx, 0xa3849b68
add dword [0x425f84], ecx
test eax, eax
jle 0x408db3
mov ebx, dword [ebp - 0x34]
push eax
lea edx, [ebp + 0x1bc]
push edx
mov ecx, ebx
call fcn.00408470
fld qword [ebp - 0x48]
fadd qword [0x41f348]
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
mov ax, word [0x423f90]
dec word [0x423f90]
movsx ecx, ax
add ecx, 0x56805edc
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fcompp
fnstsw ax
test ah, 0x41
jp 0x408c2c
mov dx, word [ebp - 0x2c]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fld dword [0x423f78]
fsubr qword [0x41f8b0]
fsubp st(1)
call fcn.0040b030
mov word [ebp - 0x2c], ax
test edi, edi
jge 0x408d58
push 5
push 0x423ca0
call fcn.00402370
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408c48
sub eax, edx
push eax
push 0
push esi
mov ecx, ebx
call fcn.00404a30
fldz
mov edi, eax
fstp qword [ebp - 0x18]
xor eax, eax
mov dword [esi], eax
push esi
mov dword [ebp - 0x14], 0
mov byte [esi + 4], al
call fcn.0040ae7f
add esp, 4
test edi, edi
jl 0x408d46
add dword [ebp - 0x40], 0x1bed8e59
mov ecx, dword [ebp - 0x40]
sub ecx, 0x11e3735e
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
mov edx, ebx
push edx
add edi, 4
fstp dword [0x423ecc]
call fcn.00406de0
fld dword [str.3M_v_]
add esp, 4
fmul dword [0x424890]
mov dword [ebp - 0x3c], eax
fstp dword [0x424890]
test eax, eax
jge 0x408d46
push 0xb
push 0x423f50
call fcn.00402370
add esp, 8
mov esi, eax
push 0
push esi
mov ecx, ebx
call fcn.00406700
fld dword [0x423cf8]
fsub qword [0x41f348]
mov ebx, eax
fstp dword [0x423cf8]
movzx eax, word [0x423cc0]
mov cx, word [ebp - 0x2c]
cwde
movsx edx, cx
sub eax, edx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd dword [0x423cf8]
movzx eax, word [ebp - 0x1c]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b030
mov word [ebp - 0x1c], ax
inc dword [ebp - 0x2c]
dec word [0x423cc0]
push esi
push 0xb
call fcn.004022b0
add esp, 8
test ebx, ebx
jge 0x408db3
mov edx, dword [0x423c44]
mov ebx, dword [ebp - 0x34]
add edx, 0x5c875398
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fld qword [ebp - 0x48]
fsubr qword [0x41f8a8]
fsubp st(1)
call fcn.0040b030
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x24], eax
test ecx, ecx
jl 0x408d87
mov eax, dword [ebx + 0x14]
sub eax, edi
cmp eax, ecx
jae 0x408db3
mov ebx, dword [ebp - 0x34]
mov ecx, dword [0x4257c8]
imul ecx, ecx, 0xf0695864
cmp dword [ebp + 0x1458], 0
mov dword [0x4257c8], ecx
je 0x408ed0
cmp dword [ebx + 0x14], 0x4000
jb 0x408ed0
mov edx, dword [ebp - 0x20]
push edx
call sub.WS2_32.dll_closesocket
fld qword [0x423e50]
fsub qword [0x41f348]
or ebx, 0xffffffff
fstp qword [0x423e50]
mov eax, dword [0x423c80]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fsub qword [0x423e50]
fadd qword [0x425f30]
fstp qword [0x425f30]
add dword [0x423c80], ebx
call sub.WS2_32.dll_WSACleanup
mov esi, dword [ebp - 0x34]
test edi, edi
jl 0x408e6d
push edi
push 0
mov ecx, esi
call fcn.00406670
mov cx, word [0x425684]
mov edx, dword [0x42402c]
add dword [0x42402c], ebx
movsx eax, cx
cmp eax, edx
jle 0x408e30
add dword [0x423c58], 0x6689d3da
jmp 0x408e6d
mov eax, dword [0x42568c]
mov cx, word [0x424948]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fadd qword [ebp - 0x48]
fsubp st(1)
call fcn.0040b030
mov dword [0x42568c], eax
fld qword [ebp - 0x48]
fsub qword [0x41f348]
fstp qword [ebp - 0x48]
add word [0x424948], bx
mov dl, byte [ebp + 0x1454]
mov edi, 0x10
test dl, dl
je 0x408eb8
xor eax, eax
mov edi, edi
cmp eax, dword [esi + 0x14]
jae 0x408e9d
cmp dword [esi + 0x18], edi
jb 0x408e93
mov ecx, dword [esi + 4]
xor byte [ecx + eax], dl
inc eax
jmp 0x408e80
xor byte [esi + eax + 4], dl
lea ecx, [esi + 4]
inc eax
jmp 0x408e80
add word [0x4256dc], bx
mov ax, word [0x4256dc]
mov ecx, dword [ebp - 0x40]
cwde
lea edx, [ecx + eax + 0x191aa2c0]
mov dword [ebp - 0x40], edx
cmp dword [ebp + 0x1b8], edi
jb 0x408a0d
mov eax, dword [ebp + 0x1a4]
push eax
jmp 0x408a05
mov cx, word [0x424944]
movzx edx, word [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
movsx eax, cx
mov ecx, dword [0x424938]
sub eax, edx
sub eax, ecx
sub eax, 0x616144e3
mov word [0x424944], ax
inc dword [0x424938]
dec dword [ebp - 0x1c]
jmp 0x408b90