Function at 0x4081d0
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.0040bec0
push 0xffffffffffffffff
push 0x41ddeb
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x424f28]
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 - 0x3c]
mov dword [ebp - 0x28], ebx
xor edx, edx
mov word [ebp - 0x2c], dx
xor eax, eax
mov word [ebp - 0x1c], ax
xor ecx, ecx
mov word [ebp - 0x18], cx
mov word [ebp - 0x24], dx
fst qword [ebp - 0x44]
mov word [ebp - 0x30], ax
mov byte [ebp + 0x11bc], al
mov eax, esi
mov dword [ebp - 0x34], ebx
fstp qword [ebp - 0x44]
mov byte [ebp - 4], 1
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408280
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x408985
fld qword [0x424dd0]
mov cx, word [ebp - 0x30]
fsub qword [0x41e8a8]
movsx edx, cx
mov dword [ebp - 0x40], edx
xor eax, eax
fild dword [ebp - 0x40]
fsubp st(1)
fstp qword [0x423038]
cmp eax, edi
jg 0x408319
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x408314
fld dword [str._j_6]
mov byte [ebp + eax + 0x13bc], 0
fstp qword [ebp - 0x44]
mov ecx, eax
fld qword [0x41e8a0]
cmp ecx, edi
jg 0x408317
movzx edx, word [ebp - 0x18]
mov bl, byte [ecx + esi]
sub edx, 0x19c0c91b
mov word [ebp - 0x18], dx
mov edx, ecx
fld qword [0x423128]
sub edx, eax
fadd st(1)
mov byte [ebp + edx + 0x11bc], bl
inc ecx
fstp dword [0x423130]
jmp 0x4082e3
inc eax
jmp 0x4082b7
fstp st(0)
fld dword [0x41e898]
lea eax, [ebp + 0x11bc]
fstp dword [0x4222a4]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408330
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 0x408343
sub eax, esi
add eax, edx
cmp eax, 0x1ff
jbe 0x408361
cmp dword [ebp + 0x1b8], 0x10
jmp 0x408974
movzx ecx, word [0x4222b8]
imul ecx, ecx, 0xd7e701e7
mov eax, edi
mov word [0x4222b8], cx
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408380
lea edi, [ebp + 0x11bc]
or ebx, 0xffffffff
sub eax, edx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408394
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 0x423d3c
rep movsb byte es:[edi], byte [esi]
call fcn.00402850
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4083c0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407fb0
push esi
push 5
call fcn.004017a0
lea eax, [ebp + 0x11bc]
add esp, 8
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4083f0
sub eax, edx
push eax
lea edx, [ebp + 0x11bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00408090
push 0x32
push 0x422ff4
call fcn.00402850
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408420
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408090
push esi
push 0x32
call fcn.004017a0
add dword [ebp - 0x18], ebx
mov ax, word [ebp - 0x18]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
add esp, 8
fild dword [ebp - 0x14]
fsub dword [0x4221d8]
fsub qword [0x41e890]
fcomp qword [0x41e888]
fnstsw ax
test ah, 0x44
jnp 0x40848a
fld dword [0x424df4]
mov edx, dword [ebp - 0x28]
add edx, 0x330946df
mov dword [ebp - 0x14], edx
fisub dword [ebp - 0x14]
fstp dword [0x424df4]
inc dword [ebp - 0x28]
jmp 0x408498
movzx eax, word [ebp - 0x2c]
imul eax, eax, 0x73767e8e
mov word [ebp - 0x2c], ax
lea eax, [ebp + 0x13bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084a1
sub eax, edx
push eax
lea ecx, [ebp + 0x13bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00408090
push 5
push 0x424dfc
call fcn.00402850
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084d1
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408090
push esi
push 5
call fcn.004017a0
add esp, 8
lea edx, [ebp]
push edx
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x408510
cmp dword [ebp + 0x1b8], 0x10
jmp 0x408974
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x40], esi
cmp esi, ebx
jne 0x408542
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x408985
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x40897d
cmp dword [ebp + 0x1458], 0
je 0x408578
movzx edx, word [ebp - 0x18]
mov eax, dword [0x4231fc]
push 4
lea ecx, [edx + eax + 0x5f61e768]
lea edx, [ebp + 0x1458]
push edx
push 0x1006
push 0xffff
push esi
mov word [ebp - 0x18], cx
call sub.WS2_32.dll_setsockopt
inc dword [ebp - 0x18]
mov ax, word [ebp - 0x18]
movsx ecx, ax
mov eax, dword [ebp - 0x34]
mov edx, 0xc8ceec23
sub edx, ecx
sub edx, eax
add edx, dword [0x4222e8]
lea ecx, [ebp + 0x13bc]
mov dword [0x4222e8], edx
add dword [ebp - 0x34], ebx
push ecx
call sub.WS2_32.dll_gethostbyname
movzx edx, word [ebp - 0x1c]
sub edx, 0x19020609
mov word [ebp - 0x1c], dx
test eax, eax
jne 0x40860c
fld dword [0x424358]
mov ax, word [0x4221d4]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fsubp st(1)
fsub qword [0x41e880]
call fcn.0040abc0
mov word [ebp - 0x24], ax
fld dword [0x424358]
cmp dword [ebp + 0x1b8], 0x10
fadd qword [0x41e350]
fstp dword [0x424358]
jb 0x408985
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x40897d
movzx edx, word [ebp - 0x24]
mov ecx, 2
mov word [ebp + 0x190], cx
movzx ecx, word [ebp - 0x1c]
sub edx, 0x673999f2
imul edx, ecx
mov word [ebp - 0x1c], dx
add dword [ebp - 0x24], ebx
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
fld dword [0x424680]
fadd qword [0x41e878]
mov word [ebp + 0x192], ax
fsubr qword [0x41e870]
fld qword [ebp - 0x3c]
fsub qword [0x41e868]
fcompp
fnstsw ax
fld qword [ebp - 0x3c]
fadd qword [0x41e350]
fstp qword [ebp - 0x3c]
test ah, 1
jne 0x4086ab
fld qword [0x422270]
mov edx, dword [str.ta_g7]
fadd qword [0x41e860]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040abc0
mov dword [str.ta_g7], eax
mov edi, 0x10
push edi
lea eax, [ebp + 0x190]
push eax
push esi
call sub.WS2_32.dll_connect
cmp eax, ebx
jne 0x4086da
cmp dword [ebp + 0x1b8], edi
jb 0x408985
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x40897d
mov eax, dword [ebp + 0x1a4]
mov dword [0x422258], 0xf6acde7a
cmp dword [ebp + 0x1b8], edi
jae 0x4086f8
lea eax, [ebp + 0x1a4]
mov edx, dword [ebp + 0x1b4]
push 0
push edx
push eax
push esi
call sub.WS2_32.dll_send
cmp eax, dword [ebp + 0x1b4]
jb 0x40896e
mov ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0x28]
push 0
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0x20]
push 0x41e858
call fcn.00407fb0
or esi, 0xffffffff
or ebx, esi
mov eax, dword [ebp - 0x40]
push 0
push 0x1000
lea edx, [ebp + 0x1bc]
push edx
push eax
call sub.WS2_32.dll_recv
mov cx, word [ebp - 0x30]
movsx edx, cx
mov ecx, dword [0x423f40]
imul edx, ecx
mov dword [0x423f40], edx
dec dword [ebp - 0x30]
test eax, eax
jle 0x4088ac
mov ecx, dword [ebp - 0x20]
push eax
lea edx, [ebp + 0x1bc]
push edx
call fcn.00408090
test esi, esi
jge 0x408875
push 5
push 0x424dfc
call fcn.00402850
add esp, 8
mov edi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408795
mov ecx, dword [ebp - 0x20]
sub eax, edx
push eax
push 0
push edi
call fcn.00404ac0
mov esi, eax
movzx eax, word [ebp - 0x1c]
sub eax, 0x57894bda
push edi
push 5
mov word [ebp - 0x1c], ax
call fcn.004017a0
add esp, 8
test esi, esi
jl 0x408875
mov eax, 1
add dword [ebp - 0x2c], eax
fld qword [0x4231c0]
movzx ecx, word [ebp - 0x18]
movsx edx, cx
movzx ecx, word [ebp - 0x2c]
movsx ecx, cx
add edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0x20]
push edx
fild dword [ebp - 0x14]
add esi, 4
fsubp st(1)
fstp qword [0x4231c0]
add dword [ebp - 0x18], eax
call fcn.00405d50
mov ebx, eax
add esp, 4
mov dword [ebp - 0x14], ebx
test ebx, ebx
jge 0x40884c
push 0xb
push 0x4230fc
call fcn.00402850
mov ecx, dword [ebp - 0x20]
add esp, 8
mov edi, eax
push 0
mov eax, 0x6c2e
push edi
mov word [ebp - 0x18], ax
call fcn.004051c0
push edi
push 0xb
mov ebx, eax
call fcn.004017a0
add esp, 8
test ebx, ebx
jge 0x4088ac
mov ebx, dword [ebp - 0x14]
mov cx, word [0x423d24]
fld qword [ebp - 0x3c]
mov dx, word [ebp - 0x24]
movsx eax, cx
movsx ecx, dx
sub eax, ecx
add eax, 0x1188d15d
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fsubp st(1)
fstp qword [ebp - 0x3c]
dec dword [ebp - 0x24]
mov dword [0x42305c], 0xddd19760
test ebx, ebx
jl 0x40888f
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x14]
sub eax, esi
cmp eax, ebx
jae 0x4088ac
cmp dword [ebp + 0x1458], 0
je 0x408731
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x14], 0x4000
jb 0x408731
mov ecx, dword [ebp - 0x40]
push ecx
call sub.WS2_32.dll_closesocket
dec dword [0x423f40]
fld qword [0x422270]
mov dx, word [ebp - 0x18]
fsubr qword [0x41e850]
movsx eax, dx
add eax, dword [0x423f40]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fcompp
fnstsw ax
test ah, 1
jne 0x408905
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fld qword [ebp - 0x3c]
fsubr qword [0x41e848]
fsub qword [0x41e840]
fsubp st(1)
call fcn.0040abc0
mov dword [ebp - 0x28], eax
call sub.WS2_32.dll_WSACleanup
movzx edx, word [0x4222d8]
imul edx, edx, 0x249f21de
mov word [0x4222d8], dx
test esi, esi
jl 0x40893d
push esi
mov esi, dword [ebp - 0x20]
push 0
mov ecx, esi
call fcn.00405130
fld qword [ebp - 0x3c]
fmul qword [0x41e838]
fstp qword [ebp - 0x3c]
jmp 0x408940
mov esi, dword [ebp - 0x20]
mov dl, byte [ebp + 0x1454]
mov edi, 0x10
test dl, dl
je 0x40896e
xor eax, eax
cmp eax, dword [esi + 0x14]
jae 0x40896e
cmp dword [esi + 0x18], edi
jb 0x408964
mov ecx, dword [esi + 4]
xor byte [ecx + eax], dl
inc eax
jmp 0x408951
xor byte [esi + eax + 4], dl
lea ecx, [esi + 4]
inc eax
jmp 0x408951
cmp dword [ebp + 0x1b8], edi
jb 0x408985
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040a58a
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.0040aba5
add ebp, 0x1440
mov esp, ebp
pop ebp
ret