Function at 0x4081e0
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.0040bf70
push 0xffffffffffffffff
push 0x41deab
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x425160]
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 - 0x1c], ecx
mov dword [ebp - 4], ebx
mov dword [ebp + 0x1b8], 0xf
mov dword [ebp + 0x1b4], ebx
mov byte [ebp + 0x1a4], bl
fldz
mov dword [ebp - 0x28], ebx
fst qword [ebp - 0x34]
mov dword [ebp - 0x48], ebx
xor edx, edx
mov word [ebp - 0x24], dx
fst qword [ebp - 0x3c]
mov dword [ebp - 0x2c], ebx
fst qword [ebp - 0x44]
fstp qword [ebp - 0x50]
xor eax, eax
mov word [ebp - 0x20], ax
mov dword [ebp - 0x20], ebx
mov ecx, dword [0x424908]
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
mov byte [ebp + 0x11bc], al
mov byte [ebp - 4], 1
fadd qword [ebp - 0x34]
mov dx, word [0x424720]
movsx eax, dx
mov dword [ebp - 0x18], eax
fild dword [ebp - 0x18]
fmulp st(1)
call fcn.0040ac50
mov esi, dword [ebp + 0x1448]
mov word [0x424720], ax
fld qword [ebp - 0x34]
fld1
mov eax, esi
fadd st(1), st(0)
lea edx, [eax + 1]
fxch st(1)
fstp qword [ebp - 0x34]
dec dword [0x424908]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4082c6
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x408a6e
fld qword [ebp - 0x50]
mov cx, word [0x424a04]
fadd qword [0x41e900]
movsx edx, cx
mov dword [ebp - 0x18], edx
fild dword [ebp - 0x18]
fsubp st(1)
call fcn.0040ac50
mov dword [ebp - 0x48], eax
xor eax, eax
cmp eax, edi
jg 0x4083b2
mov ecx, dword [0x424d9c]
add ecx, dword [ebp - 0x20]
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
fsub qword [ebp - 0x44]
fmul dword [0x422104]
fstp dword [0x422104]
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x4083aa
fld qword [0x41e8f8]
mov byte [ebp + eax + 0x13bc], 0
mov ecx, eax
cmp ecx, edi
jg 0x4083b0
mov edx, dword [0x424908]
mov bx, word [str.V]
dec word [str.V]
movsx ebx, bx
add edx, 0x8c7e7895
cmp edx, ebx
jne 0x408389
mov dx, word [0x423718]
mov ebx, dword [ebp - 0x20]
movsx edx, dx
sub edx, ebx
mov ebx, dword [ebp - 0x2c]
lea edx, [edx + ebx + 0x1610a9bd]
mov word [0x423718], dx
fld dword [0x424f50]
mov bl, byte [ecx + esi]
mov edx, ecx
fsub st(1)
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
inc ecx
fstp dword [0x424f50]
xor ebx, ebx
jmp 0x408344
inc eax
jmp 0x4082ff
fstp st(0)
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4083bb
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 0x4083ce
sub eax, esi
add eax, edx
cmp eax, 0x1ff
jbe 0x408403
fstp st(0)
cmp dword [ebp + 0x1b8], 0x10
jb 0x408a70
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040a640
add esp, 4
jmp 0x408a70
fld dword [0x4226b8]
mov eax, edi
fsub qword [0x41e8f0]
mov edx, eax
fstp dword [0x4226b8]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408419
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408429
fld qword [ebp - 0x3c]
mov ecx, eax
fsubr qword [0x41e8e8]
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]
fstp qword [ebp - 0x3c]
fadd qword [ebp - 0x3c]
fstp qword [ebp - 0x3c]
push 5
push 0x424d00
call fcn.00401140
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408467
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407de0
fldz
xor eax, eax
fst dword [ebp - 0x14]
mov dword [esi], eax
fstp dword [ebp - 0x14]
push esi
mov byte [esi + 4], al
call fcn.0040b065
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084a0
sub eax, edx
push eax
lea ecx, [ebp + 0x11bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.004080a0
push 0x32
push 0x424d60
call fcn.00401140
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084d0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004080a0
fldz
push 0x32
fst dword [ebp - 0x14]
push ebx
fstp dword [ebp - 0x14]
push esi
call fcn.0040aab0
push esi
call fcn.0040b065
fld qword [ebp - 0x34]
fsub qword [0x4248d0]
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
fstp qword [ebp - 0x34]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408515
sub eax, edx
push eax
lea edx, [ebp + 0x13bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.004080a0
push 5
push 0x4249f0
call fcn.00401140
inc dword [0x4236fc]
fld dword [0x424e14]
fsub qword [0x41e8e0]
mov esi, eax
mov eax, dword [0x4236fc]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
add esp, 8
fcompp
fnstsw ax
test ah, 0x41
jp 0x4085d4
fld qword [ebp - 0x44]
mov cx, word [ebp - 0x24]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fsubp st(1)
fadd qword [0x41e8d8]
fcomp qword [0x41e8d0]
fnstsw ax
test ah, 1
jne 0x4085b0
fld dword [0x424da4]
mov ax, word [0x424a6c]
movsx ecx, ax
sub ecx, 0x791ec609
mov dword [ebp - 0x14], ecx
fisub dword [ebp - 0x14]
fstp dword [0x424da4]
jmp 0x4085e0
fld dword [0x422148]
fsub qword [0x41e350]
fstp dword [0x422148]
fld dword [0x422148]
call fcn.0040ac50
mov dword [0x4249a4], eax
jmp 0x4085e0
mov edx, dword [ebp - 0x20]
imul edx, edx, 0xe64e6f84
mov dword [ebp - 0x20], edx
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4085e5
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004080a0
fldz
xor eax, eax
fst dword [ebp - 0x14]
mov dword [esi], eax
fstp dword [ebp - 0x14]
push esi
mov byte [esi + 4], al
call fcn.0040b065
add esp, 4
lea eax, [ebp]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x408646
cmp dword [ebp + 0x1b8], 0x10
jb 0x408a70
mov ecx, dword [ebp + 0x1a4]
push ecx
call fcn.0040a640
add esp, 4
jmp 0x408a70
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
mov ecx, 0x6f52f597
or edi, 0xffffffff
fsub dword [0x4226b8]
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0x2c], edi
add dword [ebp - 0x28], edi
sub ecx, eax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fcompp
fnstsw ax
test ah, 5
jp 0x4086c4
mov edx, dword [0x42213c]
sub edx, 0x4b799dd9
cmp edx, 0x913d6203
jg 0x4086a5
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd qword [ebp - 0x34]
fadd qword [0x41e8c8]
fmul qword [ebp - 0x44]
fstp qword [ebp - 0x44]
jmp 0x4086c4
fld qword [ebp - 0x50]
mov cx, word [0x424a70]
fstp st(0)
fld qword [ebp - 0x50]
fadd qword [0x41e350]
fstp qword [ebp - 0x50]
inc word [0x424a70]
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x18], esi
cmp esi, edi
jne 0x408710
call sub.WS2_32.dll_WSACleanup
mov edx, dword [0x4248e8]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fadd qword [0x424f48]
call fcn.0040ac50
mov dword [0x4248e8], eax
fld qword [0x424f48]
fsub qword [0x41e350]
fstp qword [0x424f48]
jmp 0x4083e2
cmp dword [ebp + 0x1458], ebx
je 0x408745
movzx ecx, word [0x424bc8]
push 4
lea edx, [ebp + 0x1458]
push edx
push 0x1006
push 0xffff
add ecx, 0x7c1b0254
push esi
mov word [0x424bc8], cx
call sub.WS2_32.dll_setsockopt
lea eax, [ebp + 0x13bc]
push eax
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
jne 0x408776
cmp dword [ebp + 0x1b8], 0x10
jb 0x408a70
mov ecx, dword [ebp + 0x1a4]
push ecx
call fcn.0040a640
add esp, 4
jmp 0x408a70
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 sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x4087e1
cmp dword [ebp + 0x1b8], edi
jb 0x408a70
mov ecx, dword [ebp + 0x1a4]
push ecx
call fcn.0040a640
add esp, 4
jmp 0x408a70
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x4087f5
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 0x408826
fld qword [ebp - 0x3c]
fsub qword [0x41e8c0]
fadd qword [ebp - 0x34]
cmp dword [ebp + 0x1b8], edi
fstp qword [ebp - 0x44]
jmp 0x4083e9
inc dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
add ecx, 0x7bd41701
push ebx
mov word [ebp - 0x20], cx
mov ecx, dword [ebp - 0x1c]
push 0x41e8b8
call fcn.00407de0
or edi, 0xffffffff
or ebx, edi
mov eax, dword [ebp - 0x18]
push 0
push 0x1000
lea edx, [ebp + 0x1bc]
push edx
push eax
call sub.WS2_32.dll_recv
test eax, eax
jg 0x40889a
fld qword [0x424c28]
fadd qword [0x4247b8]
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040ac50
mov dword [ebp - 0x28], eax
fld qword [0x424c28]
fadd qword [0x41e350]
fstp qword [0x424c28]
jmp 0x4089d9
mov ecx, dword [ebp - 0x1c]
push eax
lea edx, [ebp + 0x1bc]
push edx
call fcn.004080a0
test edi, edi
jge 0x408975
push 5
push 0x4249f0
call fcn.00401140
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088c6
mov ecx, dword [ebp - 0x1c]
sub eax, edx
push eax
push 0
push esi
call fcn.00404450
fldz
mov edi, eax
fst dword [ebp - 0x14]
xor eax, eax
fstp dword [ebp - 0x14]
mov dword [esi], eax
push esi
mov byte [esi + 4], al
call fcn.0040b065
add esp, 4
test edi, edi
jl 0x408945
mov eax, dword [ebp - 0x1c]
push eax
add edi, 4
call fcn.00406a70
mov ebx, eax
add esp, 4
mov dword [ebp - 0x14], ebx
test ebx, ebx
jge 0x408945
push 0xb
push 0x424e80
call fcn.00401140
mov ecx, dword [ebp - 0x1c]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.00404d60
push esi
push 0xb
mov ebx, eax
call fcn.00401a20
add esp, 8
test ebx, ebx
jge 0x4089d9
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fadd qword [ebp - 0x34]
mov dx, word [ebp - 0x24]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040ac50
mov word [ebp - 0x24], ax
fld qword [ebp - 0x34]
fadd qword [0x41e350]
fstp qword [ebp - 0x34]
test ebx, ebx
jl 0x408985
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x4089d9
cmp dword [ebp + 0x1458], 0
je 0x408849
fld qword [0x4247b8]
mov edx, dword [ebp - 0x2c]
fsubr qword [0x41e8b0]
mov dword [ebp - 0x14], edx
fsub qword [0x41e8a8]
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040ac50
mov dword [ebp - 0x2c], eax
fld qword [0x4247b8]
fsub qword [0x41e350]
mov eax, dword [ebp - 0x1c]
fstp qword [0x4247b8]
cmp dword [eax + 0x14], 0x4000
jb 0x408849
mov ecx, dword [ebp - 0x18]
push ecx
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
mov esi, dword [ebp - 0x1c]
test edi, edi
jl 0x408a0a
push edi
push 0
mov ecx, esi
call fcn.00404cd0
fld qword [0x424738]
fadd qword [0x41e8a0]
fstp qword [0x424738]
mov dl, byte [ebp + 0x1454]
mov edi, 0x10
test dl, dl
je 0x408a4f
xor eax, eax
jmp 0x408a20
cmp eax, dword [esi + 0x14]
jae 0x408a3d
cmp dword [esi + 0x18], edi
jb 0x408a33
mov ecx, dword [esi + 4]
xor byte [ecx + eax], dl
inc eax
jmp 0x408a20
xor byte [esi + eax + 4], dl
lea ecx, [esi + 4]
inc eax
jmp 0x408a20
fld qword [ebp - 0x3c]
fstp qword [ebp - 0x34]
fld qword [ebp - 0x3c]
fadd qword [0x41e350]
fstp qword [ebp - 0x3c]
cmp dword [ebp + 0x1b8], edi
jb 0x408a70
mov edx, dword [ebp + 0x1a4]
push edx
call fcn.0040a640
add esp, 4
jmp 0x408a70
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.0040b0f3
add ebp, 0x1440
mov esp, ebp
pop ebp
ret