Function at 0x408790
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.0040c520
push 0xffffffffffffffff
push 0x41e45b
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x425fd0]
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 - 0x28], eax
mov dword [ebp - 0x18], 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]
mov dword [ebp - 0x1c], ebx
fstp qword [ebp - 0x38]
fldz
xor edx, edx
fst dword [ebp - 0x24]
xor eax, eax
mov dword [ebp - 0x24], ebx
fst dword [ebp - 0x24]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x24], ebx
mov word [ebp - 0x20], dx
mov word [ebp - 0x14], ax
fstp dword [ebp - 0x30]
mov byte [ebp + 0x11bc], al
mov eax, esi
mov byte [ebp - 4], 1
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408840
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x408b14
xor eax, eax
cmp eax, edi
jg 0x40888b
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x408888
mov byte [ebp + eax + 0x13bc], 0
mov ecx, eax
cmp ecx, edi
jg 0x40888b
mov bl, byte [ecx + esi]
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
inc ecx
jmp 0x408873
inc eax
jmp 0x408856
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408894
mov edi, dword [ebp - 0x28]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088a7
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x408afc
mov eax, edi
mov edx, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088c1
lea edi, [ebp + 0x11bc]
or ebx, 0xffffffff
sub eax, edx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4088d5
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 0x4246d0
rep movsb byte es:[edi], byte [esi]
call fcn.00401e10
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408901
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408390
fldz
xor eax, eax
fstp qword [ebp - 0x2c]
mov dword [esi], eax
xor ecx, ecx
mov word [ebp - 0x14], cx
mov byte [esi + 4], al
movzx edx, word [0x425ea4]
add edx, 0x224ec574
push esi
mov word [0x425ea4], dx
call fcn.0040b18a
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408950
sub eax, edx
push eax
lea eax, [ebp + 0x11bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.00408650
push 0x32
push str.OG_j
call fcn.00401e10
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], ecx
fild dword [ebp - 0x28]
add esp, 8
mov esi, eax
fmul dword [0x4250bc]
call fcn.0040b060
mov dword [ebp - 0x1c], eax
fld dword [0x4250bc]
fsub qword [0x41f348]
mov eax, esi
lea edx, [eax + 1]
fstp dword [0x4250bc]
jmp 0x4089b0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4089b0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408650
fldz
xor edx, edx
fstp qword [ebp - 0x2c]
push 0x32
push edx
mov word [ebp - 0x14], dx
push esi
call fcn.0040b110
movzx eax, word [0x425ea4]
add eax, 0x224ec574
push esi
mov word [0x425ea4], ax
call fcn.0040b18a
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408a00
sub eax, edx
push eax
lea ecx, [ebp + 0x13bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00408650
push 5
push 0x4233d4
call fcn.00401e10
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408a30
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408650
fldz
xor eax, eax
fstp qword [ebp - 0x2c]
mov dword [esi], eax
xor edx, edx
mov byte [esi + 4], al
mov word [ebp - 0x14], dx
movzx eax, word [0x425ea4]
add eax, 0x224ec574
push esi
mov word [0x425ea4], ax
call fcn.0040b18a
add esp, 4
lea ecx, [ebp]
push ecx
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x408a9b
cmp dword [ebp + 0x1b8], 0x10
jb 0x408b14
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x408b0c
mov ax, word [ebp - 0x20]
mov edx, dword [0x42337c]
movsx ecx, ax
sub ecx, edx
mov dword [ebp - 0x28], ecx
push 6
push 1
fild dword [ebp - 0x28]
push 2
fsub qword [ebp - 0x38]
fadd dword [0x424204]
fstp dword [0x424204]
add dword [ebp - 0x20], ebx
call sub.WS2_32.dll_socket
fld dword [0x41f898]
mov esi, eax
fstp dword [0x424208]
mov dword [ebp - 0x28], esi
cmp esi, ebx
jne 0x408b39
call sub.WS2_32.dll_WSACleanup
fld dword [ebp - 0x30]
fadd qword [0x41f890]
fmul dword [0x424360]
fstp dword [0x424360]
cmp dword [ebp + 0x1b8], 0x10
jb 0x408b14
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040abe8
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.0040b6e4
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
add dword [0x4234a0], ebx
mov ecx, dword [0x4234a0]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fld dword [ebp - 0x30]
fsub qword [0x41f888]
fcompp
fnstsw ax
test ah, 0x41
jne 0x408b67
mov dword [0x423134], 0xc52a19b
cmp dword [ebp + 0x1458], 0
je 0x408b89
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
test eax, eax
jne 0x408ba5
cmp dword [ebp + 0x1b8], 0x10
jmp 0x408e45
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, ebx
je 0x408e3f
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408c07
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]
jae 0x408c2a
cmp dword [ebp + 0x1b8], edi
jmp 0x408b03
mov ecx, dword [ebp - 0x18]
push 0
push 0x41f880
call fcn.00408390
or esi, 0xffffffff
or ebx, esi
mov edi, edi
mov edx, dword [ebp - 0x28]
push 0
push 0x1000
lea ecx, [ebp + 0x1bc]
push ecx
push edx
call sub.WS2_32.dll_recv
test eax, eax
jle 0x408ded
mov ecx, dword [ebp - 0x18]
push eax
lea eax, [ebp + 0x1bc]
push eax
call fcn.00408650
test esi, esi
jge 0x408d9f
push 5
push 0x4233d4
call fcn.00401e10
fld dword [0x423450]
mov cx, word [ebp - 0x20]
movsx edx, cx
mov edi, eax
mov ax, word [0x4250d0]
mov dword [ebp - 0x14], edx
mov dx, word [0x42340c]
movsx ecx, ax
fild dword [ebp - 0x14]
mov dword [ebp - 0x14], ecx
faddp st(1)
movsx eax, dx
fild dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
add esp, 8
fsubp st(1)
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b060
mov word [0x42340c], ax
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408cd0
mov ecx, dword [ebp - 0x18]
sub eax, edx
push eax
push 0
push edi
call fcn.00404ab0
fld qword [0x4241f0]
mov ecx, dword [0x42337c]
fadd qword [0x41f878]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
push edi
push 5
mov esi, eax
fsubp st(1)
fmul qword [0x4242f8]
fstp qword [0x4242f8]
dec dword [0x42337c]
fld qword [0x4241f0]
fsub qword [0x41f348]
fstp qword [0x4241f0]
call fcn.00401dc0
add esp, 8
test esi, esi
jl 0x408d88
mov edx, dword [ebp - 0x18]
push edx
add esi, 4
call fcn.00405f40
mov ebx, eax
add esp, 4
mov dword [ebp - 0x14], ebx
test ebx, ebx
jge 0x408d88
fld dword [ebp - 0x30]
push 0xb
fsub qword [0x41f870]
push 0x424224
fstp dword [ebp - 0x30]
call fcn.00401e10
mov ecx, dword [ebp - 0x18]
add esp, 8
mov edi, eax
push 0
push edi
call fcn.00405d60
push edi
push 0xb
mov ebx, eax
call fcn.00401dc0
add esp, 8
test ebx, ebx
jge 0x408ded
mov ebx, dword [ebp - 0x14]
mov ax, word [ebp - 0x20]
movsx ecx, ax
mov edx, 0xb2617663
sub edx, ecx
add edx, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], edx
dec dword [ebp - 0x20]
test ebx, ebx
jl 0x408daf
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x14]
sub eax, esi
cmp eax, ebx
jae 0x408ded
cmp dword [ebp + 0x1458], 0
je 0x408e6c
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], ecx
fild dword [ebp - 0x1c]
fld qword [0x4241e8]
fsub qword [0x41f868]
fsub qword [0x41f860]
fsubp st(1)
call fcn.0040b060
mov edx, dword [ebp - 0x18]
cmp dword [edx + 0x14], 0x4000
mov dword [ebp - 0x1c], eax
jb 0x408e57
mov eax, dword [ebp - 0x28]
push eax
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
test esi, esi
jl 0x408e0e
push esi
mov esi, dword [ebp - 0x18]
push 0
mov ecx, esi
call fcn.00405cd0
jmp 0x408e11
mov esi, dword [ebp - 0x18]
mov dl, byte [ebp + 0x1454]
mov edi, 0x10
test dl, dl
je 0x408e3f
xor eax, eax
cmp eax, dword [esi + 0x14]
jae 0x408e3f
cmp dword [esi + 0x18], edi
jb 0x408e35
mov ecx, dword [esi + 4]
xor byte [ecx + eax], dl
inc eax
jmp 0x408e22
xor byte [esi + eax + 4], dl
lea ecx, [esi + 4]
inc eax
jmp 0x408e22
cmp dword [ebp + 0x1b8], edi
jb 0x408b14
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x408b0c
fld dword [0x425ea8]
fadd qword [0x41f858]
call fcn.0040b060
mov word [ebp - 0x14], ax
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fadd dword [0x424204]
call fcn.0040b060
mov dword [ebp - 0x14], eax
inc dword [ebp - 0x24]
fld dword [0x424204]
fsub qword [0x41f348]
fstp dword [0x424204]
jmp 0x408c40