Function at 0x4083d0
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.0040cad0
push 0xffffffffffffffff
push 0x41ea0b
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x4260c0]
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 - 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]
xor edx, edx
mov word [ebp - 0x2c], dx
fst dword [ebp - 0x38]
fldz
xor eax, eax
mov word [ebp - 0x28], ax
xor ecx, ecx
mov word [ebp - 0x44], cx
fstp qword [ebp - 0x40]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
fst dword [ebp - 0x34]
mov byte [ebp + 0x11bc], al
mov eax, esi
mov dword [ebp - 0x24], ebx
fst dword [ebp - 0x18]
mov byte [ebp - 4], 1
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40847d
fld dword [ebp - 0x38]
sub eax, edx
fsub qword [ebp - 0x40]
mov edi, eax
cmp edi, 0x7f
fstp dword [ebp - 0x38]
jg 0x408f1e
xor ecx, ecx
lea edx, [ecx + 1]
cmp ecx, edi
jg 0x408532
mov al, byte [ecx + esi]
mov byte [ebp + ecx + 0x13bc], al
cmp al, 0x2f
jne 0x408520
fld dword [0x41f830]
mov byte [ebp + ecx + 0x13bc], 0
fld1
mov edx, ecx
fld qword [0x41f828]
cmp edx, edi
jg 0x408527
fld dword [0x424a50]
mov bl, byte [edx + esi]
fucomp st(3)
mov eax, edx
sub eax, ecx
mov byte [ebp + eax + 0x11bc], bl
fnstsw ax
fld dword [0x424a50]
fadd st(2)
fstp dword [0x424a50]
test ah, 0x44
jnp 0x40851b
fld dword [0x423234]
fadd st(1)
fadd qword [ebp - 0x40]
fmul dword [0x4235e4]
fstp dword [0x4235e4]
fld qword [ebp - 0x40]
fadd st(2)
fstp qword [ebp - 0x40]
inc edx
xor ebx, ebx
jmp 0x4084cd
add ecx, edx
jmp 0x40849f
fstp st(1)
mov edx, 1
fstp st(0)
fstp st(0)
add word [0x424aac], dx
mov cx, word [0x424aac]
movsx eax, cx
mov ecx, dword [ebp - 0x24]
add eax, 0x528babbc
cmp ecx, eax
jl 0x408574
add dword [ebp - 0x28], edx
movzx eax, word [ebp - 0x28]
movsx ecx, ax
movzx eax, word [ebp - 0x28]
cwde
lea ecx, [ecx + eax - 0x101c76f4]
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
fstp qword [0x425a58]
add dword [ebp - 0x28], edx
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40857d
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 0x408590
sub eax, esi
add eax, edx
cmp eax, 0x1ff
jbe 0x4085c5
cmp dword [ebp + 0x1b8], 0x10
fstp st(0)
jb 0x408f20
mov edx, dword [ebp + 0x1a4]
push edx
call fcn.0040b19e
add esp, 4
jmp 0x408f20
mov eax, edi
mov esi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4085c9
lea edi, [ebp + 0x11bc]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4085d9
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov dword [ebp - 0x14], ebx
mov word [ebp - 0x18], ax
push 5
fstp dword [ebp - 0x14]
call fcn.0040b819
mov ecx, dword [0x4230d4]
mov esi, eax
mov dword [esi], ecx
mov dl, byte [0x4230d8]
mov byte [esi + 4], dl
mov eax, dword [0x4278c4]
sub eax, 0x423004
add esp, 4
lea edi, [esi + 5]
mov ecx, esi
add eax, 0x4230d4
lea esp, [esp]
cmp ecx, edi
je 0x40863c
mov dl, byte [eax]
xor byte [ecx], dl
inc ecx
inc eax
jmp 0x408630
mov ax, word [0x42595c]
mov edx, dword [0x425708]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fadd dword [ebp - 0x38]
fsubp st(1)
call fcn.0040b610
mov word [0x42595c], ax
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408670
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407f40
fldz
xor eax, eax
mov dword [esi], eax
mov dword [ebp - 0x14], ebx
fstp dword [ebp - 0x18]
push esi
mov byte [esi + 4], al
call fcn.0040b6bb
mov ax, word [0x4244e8]
fld dword [ebp - 0x18]
mov ecx, dword [0x425950]
cwde
sub eax, ecx
add esp, 4
add eax, 0x45f7d427
mov dword [ebp - 0x14], eax
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
fisub dword [ebp - 0x14]
fstp dword [ebp - 0x18]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086c7
sub eax, edx
push eax
lea edx, [ebp + 0x11bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00408290
fldz
xor eax, eax
mov dword [ebp - 0x14], ebx
mov word [ebp - 0x18], ax
fstp dword [ebp - 0x14]
push 0x32
call fcn.0040b819
push 0x32
mov esi, eax
push 0x42319c
push esi
call fcn.0040b8f0
mov eax, dword [0x4278c4]
sub eax, 0x423004
add esp, 0x10
lea edi, [esi + 0x32]
mov ecx, esi
add eax, 0x42319c
mov edi, edi
cmp ecx, edi
je 0x40872c
mov dl, byte [eax]
xor byte [ecx], dl
inc ecx
inc eax
jmp 0x408720
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408731
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408290
fldz
push 0x32
push ebx
mov dword [ebp - 0x14], ebx
fstp dword [ebp - 0x18]
push esi
call fcn.0040b750
push esi
call fcn.0040b6bb
mov ax, word [0x4244e8]
fld dword [ebp - 0x18]
mov ecx, dword [0x425950]
cwde
sub eax, ecx
add esp, 0x10
add eax, 0x45f7d427
mov dword [ebp - 0x14], eax
lea eax, [ebp + 0x13bc]
lea edx, [eax + 1]
fisub dword [ebp - 0x14]
fstp dword [ebp - 0x18]
fld qword [ebp - 0x40]
fsub qword [0x41f820]
fstp qword [ebp - 0x40]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408796
sub eax, edx
push eax
lea edx, [ebp + 0x13bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00408290
fld dword [ebp - 0x34]
fsub qword [0x41f818]
xor eax, eax
push 5
fstp dword [ebp - 0x34]
mov dword [ebp - 0x14], ebx
fldz
mov word [ebp - 0x18], ax
fstp dword [ebp - 0x14]
call fcn.0040b819
mov ecx, dword [0x4256f0]
mov esi, eax
mov dword [esi], ecx
mov dl, byte [0x4256f4]
mov byte [esi + 4], dl
mov eax, dword [0x4278c4]
sub eax, 0x423004
add esp, 4
lea edi, [esi + 5]
mov ecx, esi
add eax, 0x4256f0
lea ecx, [ecx]
cmp ecx, edi
je 0x40880c
mov dl, byte [eax]
xor byte [ecx], dl
inc ecx
inc eax
jmp 0x408800
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408811
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408290
fldz
xor eax, eax
mov dword [esi], eax
mov dword [ebp - 0x14], ebx
fstp dword [ebp - 0x18]
push esi
mov byte [esi + 4], al
call fcn.0040b6bb
mov ax, word [0x4244e8]
fld dword [ebp - 0x18]
mov ecx, dword [0x425950]
cwde
sub eax, ecx
add eax, 0x45f7d427
mov dword [ebp - 0x14], eax
add esp, 4
lea edx, [ebp]
fisub dword [ebp - 0x14]
push edx
push 0x202
fstp dword [ebp - 0x18]
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x40888d
mov eax, dword [str.ee]
imul eax, eax, 0x571242b4
cmp dword [ebp + 0x1b8], 0x10
mov dword [str.ee], eax
jmp 0x408f05
push 6
mov edi, 1
push edi
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x18], esi
cmp esi, 0xffffffff
jne 0x408905
call sub.WS2_32.dll_WSACleanup
or eax, esi
add dword [ebp - 0x44], eax
mov dx, word [ebp - 0x44]
movsx ecx, dx
mov edx, 0xf80ce46
sub edx, ecx
cmp edx, 0x8e2b8857
jne 0x4088e4
mov ecx, dword [0x424a98]
add ecx, 0x68f3140e
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fadd dword [ebp - 0x34]
fstp dword [ebp - 0x34]
add dword [0x424a98], eax
cmp dword [ebp + 0x1b8], 0x10
jb 0x408f20
mov edx, dword [ebp + 0x1a4]
push edx
call fcn.0040b19e
add esp, 4
jmp 0x408f20
fld qword [0x4249f0]
mov edx, 0x5796f800
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [0x4249f0]
add dword [ebp - 0x2c], edi
fld qword [0x4249f0]
fsubr qword [0x41f810]
fsub dword [ebp - 0x34]
mov ax, word [ebp - 0x2c]
movsx ecx, ax
sub edx, ecx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fcompp
fnstsw ax
test ah, 1
jne 0x408952
fld qword [0x41f808]
fstp qword [0x4244b8]
cmp dword [ebp + 0x1458], ebx
je 0x40899c
fadd dword [0x4230ac]
push 4
lea ecx, [ebp + 0x1458]
push ecx
fstp dword [0x4230ac]
push 0x1006
fld dword [0x4230ac]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
fiadd dword [ebp - 0x14]
push 0xffff
push esi
fmul dword [0x42581c]
fstp dword [0x42581c]
call sub.WS2_32.dll_setsockopt
jmp 0x40899e
fstp st(0)
lea edx, [ebp + 0x13bc]
push edx
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
jne 0x4089cf
cmp dword [ebp + 0x1b8], 0x10
jb 0x408f20
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040b19e
add esp, 4
jmp 0x408f20
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 dword [ebp + 0x194], eax
mov dword [0x423978], 0x34a578c
push 0x50
call sub.WS2_32.dll_htons
mov dx, word [ebp - 0x44]
mov ecx, dword [ebp - 0x1c]
mov word [ebp + 0x192], ax
movsx eax, dx
mov edx, dword [ebp - 0x24]
add dword [ebp - 0x1c], edi
add dword [ebp - 0x24], edi
sub eax, ecx
sub edx, 0x5f4b63
cmp edx, eax
jg 0x408a47
mov eax, dword [str.ee]
add eax, 0x332c6a6a
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fstp dword [0x425a44]
add dword [str.ee], edi
mov edi, 0x10
push edi
lea ecx, [ebp + 0x190]
push ecx
push esi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x408a7f
cmp dword [ebp + 0x1b8], edi
jb 0x408f20
mov edx, dword [ebp + 0x1a4]
push edx
call fcn.0040b19e
add esp, 4
jmp 0x408f20
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408a93
lea eax, [ebp + 0x1a4]
mov ecx, dword [ebp + 0x1b4]
push ebx
push ecx
push eax
push esi
call sub.WS2_32.dll_send
cmp eax, dword [ebp + 0x1b4]
jae 0x408ad8
movzx edx, word [ebp - 0x2c]
add edx, 0x1b360b28
mov word [ebp - 0x2c], dx
cmp dword [ebp + 0x1b8], edi
jb 0x408f20
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040b19e
add esp, 4
jmp 0x408f20
mov ecx, dword [ebp - 0x30]
push ebx
push 0x41f800
call fcn.00407f40
fld qword [ebp - 0x40]
fsub qword [0x41f350]
fstp qword [ebp - 0x40]
fld qword [ebp - 0x40]
mov cx, word [0x425790]
fadd qword [0x41f7f8]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b610
or esi, 0xffffffff
or ebx, esi
mov word [0x425790], ax
mov dword [ebp - 0x2c], ebx
mov ecx, dword [ebp - 0x18]
push 0
push 0x1000
lea eax, [ebp + 0x1bc]
push eax
push ecx
call sub.WS2_32.dll_recv
test eax, eax
jg 0x408b5b
inc dword [ebp - 0x28]
fld dword [ebp - 0x34]
mov dx, word [ebp - 0x28]
movsx eax, dx
sub eax, 0x2e327d45
mov dword [ebp - 0x14], eax
fisub dword [ebp - 0x14]
fstp dword [ebp - 0x34]
jmp 0x408d4d
push eax
lea ecx, [ebp + 0x1bc]
push ecx
mov ecx, dword [ebp - 0x30]
call fcn.00408290
test esi, esi
jge 0x408c81
push 5
push 0x4256f0
call fcn.004015d0
add esp, 8
mov edi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408b87
mov ecx, dword [ebp - 0x30]
sub eax, edx
push eax
push 0
push edi
call fcn.00404710
push edi
push 5
mov esi, eax
call fcn.004025c0
fld dword [0x42597c]
fsub qword [0x41f350]
add esp, 8
fstp dword [0x42597c]
fld dword [0x42597c]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], edx
fiadd dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040b610
mov dword [ebp - 0x1c], eax
dec dword [ebp - 0x20]
test esi, esi
jl 0x408c81
mov ecx, dword [ebp - 0x30]
push ecx
add esi, 4
call fcn.00405e70
mov ebx, eax
add esp, 4
mov dword [ebp - 0x2c], ebx
test ebx, ebx
jge 0x408c46
push 0xb
push 0x425738
call fcn.004015d0
fld qword [0x424a58]
fsub qword [0x41f7f0]
mov ecx, dword [ebp - 0x30]
add esp, 8
mov edi, eax
push 0
fstp qword [0x424a58]
push edi
call fcn.00405b60
push edi
push 0xb
mov ebx, eax
call fcn.004025c0
add esp, 8
test ebx, ebx
jge 0x408d4d
mov ebx, dword [ebp - 0x2c]
mov dx, word [0x4238d4]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd qword [0x4239a8]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040b610
mov dword [ebp - 0x20], eax
fld qword [0x4239a8]
fadd qword [0x41f350]
fstp qword [0x4239a8]
test ebx, ebx
jl 0x408c98
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0x14]
sub eax, esi
cmp eax, ebx
jae 0x408d4d
mov ebx, dword [ebp - 0x2c]
cmp dword [ebp + 0x1458], 0
je 0x408b20
or ecx, 0xffffffff
add dword [ebp - 0x1c], ecx
fld dword [ebp - 0x38]
fsubr qword [0x41f7e8]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
fisub dword [ebp - 0x14]
fld dword [ebp - 0x34]
fcompp
fnstsw ax
fld dword [ebp - 0x38]
fsub qword [0x41f350]
fstp dword [ebp - 0x38]
test ah, 0x41
jp 0x408d01
mov dx, word [0x42316c]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fld qword [ebp - 0x40]
fld qword [ebp - 0x40]
faddp st(2)
fxch st(1)
fsub qword [0x41f7e0]
fsubp st(1)
fstp qword [ebp - 0x40]
add word [0x42316c], cx
mov ecx, dword [ebp - 0x30]
cmp dword [ecx + 0x14], 0x4000
jb 0x408b20
mov eax, 1
add dword [ebp - 0x1c], eax
add dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
sub eax, edx
add eax, dword [ebp - 0x20]
mov cx, word [0x4259c8]
movsx edx, cx
sub edx, 0x6fc0ed22
cmp edx, eax
jge 0x408d4d
fld qword [0x425a50]
fmul qword [0x41f7d8]
fstp qword [0x425a50]
mov eax, dword [ebp - 0x24]
add eax, 0x438f01bf
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fld dword [0x424a7c]
fsub qword [0x41f7d0]
fucompp
fnstsw ax
fld dword [0x424a7c]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [0x424a7c]
test ah, 0x44
jnp 0x408da8
mov cx, word [0x423198]
fstp st(0)
movsx edx, cx
sub edx, 0x1d0977d
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fadd dword [0x424a54]
fstp dword [0x424a54]
jmp 0x408de0
fadd qword [0x424ab0]
fstp qword [0x424ab0]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fsub qword [0x424ab0]
mov cx, word [0x425714]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b610
mov word [0x425714], ax
mov eax, dword [ebp - 0x18]
push eax
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
test esi, esi
jl 0x408e2c
push esi
mov esi, dword [ebp - 0x30]
push 0
mov ecx, esi
call fcn.00405ad0
mov cx, word [0x425a90]
movsx edx, cx
mov ecx, dword [ebp - 0x20]
mov eax, 0x370caf86
sub eax, edx
sub eax, ecx
add eax, dword [ebp - 0x24]
mov edi, 1
mov dword [ebp - 0x24], eax
add dword [ebp - 0x20], edi
dec word [0x425a90]
jmp 0x408e34
mov esi, dword [ebp - 0x30]
mov edi, 1
movzx edx, word [0x4259c8]
mov ecx, dword [0x423978]
movsx eax, dx
movzx edx, word [ebp - 0x44]
add eax, ecx
movsx ecx, dx
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fadd qword [0x4230f0]
mov edx, dword [ebp - 0x20]
add edx, eax
mov ax, word [0x425a94]
movsx ecx, ax
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fsubp st(2)
fucompp
fnstsw ax
fld qword [0x4230f0]
fsub qword [0x41f350]
fstp qword [0x4230f0]
add dword [ebp - 0x20], edi
test ah, 0x44
jnp 0x408ec1
mov dx, word [0x42313c]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd dword [0x4238f8]
fadd qword [0x41f7c8]
call fcn.0040b610
mov word [ebp - 0x28], ax
add word [0x42313c], di
jmp 0x408ecb
mov dword [0x42571c], 0xf34752f
mov dl, byte [ebp + 0x1454]
mov ebx, 0x10
test dl, dl
je 0x408eff
xor eax, eax
lea esp, [esp]
cmp eax, dword [esi + 0x14]
jae 0x408eff
cmp dword [esi + 0x18], ebx
jb 0x408ef4
mov ecx, dword [esi + 4]
xor byte [ecx + eax], dl
add eax, edi
jmp 0x408ee0
xor byte [esi + eax + 4], dl
lea ecx, [esi + 4]
add eax, edi
jmp 0x408ee0
cmp dword [ebp + 0x1b8], ebx
jb 0x408f20
mov ecx, dword [ebp + 0x1a4]
push ecx
call fcn.0040b19e
add esp, 4
jmp 0x408f20
fstp st(0)
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.0040bc94
add ebp, 0x1440
mov esp, ebp
pop ebp
ret