Function at 0x407f20
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
lea ebp, [esp - 0x1440]
mov eax, 0x1440
call fcn.0040bc90
push 0xffffffffffffffff
push 0x41dbcb
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x424e90]
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]
fst dword [ebp - 0x18]
xor edx, edx
mov word [ebp - 0x24], dx
fst dword [ebp - 0x1c]
fldz
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x34], ebx
fst qword [ebp - 0x2c]
fst qword [ebp - 0x4c]
mov eax, esi
fst qword [ebp - 0x3c]
mov byte [ebp + 0x11bc], dl
fstp qword [ebp - 0x44]
mov byte [ebp - 4], 1
lea edx, [eax + 1]
fstp dword [ebp - 0x34]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407fc7
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x408408
add dword [ebp - 0x20], 0xb2a20b21
xor eax, eax
cmp eax, edi
jg 0x408019
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x408016
mov byte [ebp + eax + 0x13bc], 0
mov ecx, eax
cmp ecx, edi
jg 0x408019
mov bl, byte [ecx + esi]
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
inc ecx
jmp 0x408001
inc eax
jmp 0x407fe4
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408022
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 0x408035
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x4083f0
mov eax, edi
mov edx, edi
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408050
lea edi, [ebp + 0x11bc]
or ebx, 0xffffffff
sub eax, edx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408064
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 str.3Ez
rep movsb byte es:[edi], byte [esi]
call fcn.004016a0
mov ecx, 0x7831
add esp, 8
mov esi, eax
mov word [0x423e80], cx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4080a0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407d00
xor eax, eax
xor edi, edi
mov dword [esi], eax
mov dword [ebp - 0x14], edi
push esi
mov dword [ebp - 0x14], edi
mov byte [esi + 4], al
call fcn.0040a8c4
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4080d7
sub eax, edx
push eax
lea edx, [ebp + 0x11bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00407de0
push 0x32
push 0x423890
call fcn.004016a0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408107
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407de0
push 0x32
push edi
mov dword [ebp - 0x14], edi
push esi
mov dword [ebp - 0x14], edi
call fcn.0040ade0
push esi
call fcn.0040a8c4
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408140
sub eax, edx
push eax
lea eax, [ebp + 0x13bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.00407de0
push 5
push 0x423868
call fcn.004016a0
mov ecx, dword [0x422648]
mov edx, 0x6da8d29b
sub edx, ecx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
add esp, 8
mov esi, eax
lea edx, [eax + 1]
fadd dword [ebp - 0x18]
fstp dword [ebp - 0x18]
add dword [0x422648], ebx
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408190
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407de0
xor eax, eax
mov dword [esi], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x14], edi
push esi
mov byte [esi + 4], al
call fcn.0040a8c4
mov ax, word [0x423884]
movsx ecx, ax
sub ecx, 0x7ce7e5fc
add esp, 4
cmp ecx, 0x490d14b8
jge 0x408263
fld qword [0x4226c0]
mov edx, dword [ebp - 0x20]
fadd qword [0x41e768]
add dword [ebp - 0x20], ebx
sub edx, 0x71749d39
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fucompp
fnstsw ax
test ah, 0x44
jp 0x408224
fld qword [ebp - 0x3c]
fsub qword [0x41e760]
fadd qword [0x41e758]
fadd dword [ebp - 0x18]
fstp dword [ebp - 0x18]
fld qword [ebp - 0x3c]
fsub qword [0x41e348]
fstp qword [ebp - 0x3c]
jmp 0x4082c3
mov ax, word [0x423e80]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fsub dword [ebp - 0x18]
mov edx, dword [0x422648]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040a7e0
mov dword [0x422648], eax
fld dword [ebp - 0x18]
fadd qword [0x41e348]
fstp dword [ebp - 0x18]
add word [0x423e80], bx
jmp 0x4082c3
fld qword [ebp - 0x3c]
fsub qword [0x41e348]
fstp qword [ebp - 0x3c]
mov ax, word [0x422524]
movsx ecx, ax
sub ecx, 0x2f31407
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fld qword [ebp - 0x3c]
fsub qword [0x41e750]
fucompp
fnstsw ax
test ah, 0x44
jp 0x4082c3
fld dword [ebp - 0x18]
mov edx, dword [0x42391c]
mov ax, word [ebp - 0x24]
mov dword [ebp - 0x14], edx
fisub dword [ebp - 0x14]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fadd qword [0x41e748]
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040a7e0
mov word [ebp - 0x24], ax
lea edx, [ebp]
push edx
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x4083f0
push 6
mov edi, 1
push edi
push 2
call sub.WS2_32.dll_socket
fld dword [ebp - 0x18]
fsub qword [0x41e740]
mov esi, eax
mov dword [ebp - 0x14], esi
fcomp qword [0x41e738]
fnstsw ax
test ah, 1
jne 0x408323
add dword [0x4226d8], edi
mov ecx, dword [0x4226d8]
mov dword [ebp - 0x24], ecx
fild dword [ebp - 0x24]
fadd dword [0x423928]
fadd qword [ebp - 0x2c]
fstp qword [ebp - 0x2c]
jmp 0x40835a
mov edx, dword [0x42251c]
mov dword [ebp - 0x24], edx
fild dword [ebp - 0x24]
fadd dword [0x423f40]
mov eax, dword [0x4224bc]
mov dword [ebp - 0x24], eax
fild dword [ebp - 0x24]
fsubp st(1)
fsubr qword [ebp - 0x44]
fstp qword [ebp - 0x44]
fld dword [0x423f40]
fsub qword [0x41e348]
fstp dword [0x423f40]
cmp esi, ebx
jne 0x408390
mov cx, word [0x423918]
movsx edx, cx
mov eax, 0x7353adbf
sub eax, edx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fstp qword [ebp - 0x44]
add word [0x423918], di
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jmp 0x408748
cmp dword [ebp + 0x1458], 0
je 0x4083cf
push 4
lea edx, [ebp + 0x1458]
push edx
push 0x1006
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
mov ax, word [0x4227c4]
movzx ecx, word [0x423918]
cwde
sub eax, ecx
mov word [0x4227c4], ax
add word [0x423918], bx
lea edx, [ebp + 0x13bc]
push edx
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x40842d
fld dword [ebp - 0x1c]
fsubr qword [0x41e730]
call fcn.0040a7e0
mov dword [ebp - 0x20], eax
cmp dword [ebp + 0x1b8], 0x10
jb 0x408408
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040a374
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.0040ae5a
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
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, ebx
jne 0x408495
movzx eax, word [0x423990]
imul eax, eax, 0x596c2500
cmp dword [ebp + 0x1b8], edi
mov word [0x423990], ax
jmp 0x408748
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x4084a9
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 0x4084cc
cmp dword [ebp + 0x1b8], edi
jmp 0x4083f7
mov ecx, dword [ebp - 0x30]
push 0
push 0x41e728
call fcn.00407d00
fld dword [0x423518]
fsub qword [0x41e720]
mov edi, ebx
mov dword [ebp - 0x24], ebx
mov ebx, dword [ebp - 0x30]
fmul qword [ebp - 0x2c]
fstp qword [ebp - 0x2c]
jmp 0x4084f9
fstp st(0)
fld qword [ebp - 0x2c]
mov edx, dword [ebp - 0x14]
fadd qword [0x41e718]
push 0
push 0x1000
lea ecx, [ebp + 0x1bc]
fmul qword [ebp - 0x2c]
push ecx
push edx
fstp qword [ebp - 0x2c]
call sub.WS2_32.dll_recv
mov esi, eax
test esi, esi
jle 0x4086b6
fld dword [ebp - 0x18]
fadd qword [0x41e348]
fstp dword [ebp - 0x18]
fld dword [ebp - 0x18]
mov eax, dword [0x422520]
fsub qword [0x41e710]
mov dword [ebp - 0x1c], eax
fild dword [ebp - 0x1c]
fmulp st(1)
call fcn.0040a7e0
push esi
lea ecx, [ebp + 0x1bc]
push ecx
mov ecx, ebx
mov dword [0x422520], eax
call fcn.00407de0
test edi, edi
jge 0x408630
push 5
push 0x423868
call fcn.004016a0
mov dx, word [0x42269c]
mov esi, eax
movsx eax, dx
mov ecx, 0x961b81a0
add esp, 8
sub ecx, eax
mov dword [ebp - 0x1c], ecx
mov eax, esi
lea edx, [eax + 1]
fild dword [ebp - 0x1c]
fadd qword [0x423860]
fstp qword [0x423860]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4085a5
sub eax, edx
push eax
push 0
push esi
mov ecx, ebx
call fcn.00404070
mov edi, eax
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [esi], eax
push esi
mov dword [ebp - 0x1c], eax
mov byte [esi + 4], al
call fcn.0040a8c4
add esp, 4
test edi, edi
jl 0x408630
push ebx
add edi, 4
call fcn.00406080
add esp, 4
mov dword [ebp - 0x24], eax
test eax, eax
jge 0x408630
push 0xb
push 0x4238f0
call fcn.004016a0
movzx edx, word [0x423884]
mov ecx, dword [ebp - 0x30]
add esp, 8
mov esi, eax
push 0
sub edx, 0x1b6ada7e
push esi
mov word [0x423884], dx
call fcn.004052b0
push esi
push 0xb
mov ebx, eax
call fcn.00401f90
add esp, 8
test ebx, ebx
mov ebx, dword [ebp - 0x30]
jge 0x4086b6
or eax, 0xffffffff
add word [0x42269c], ax
add dword [0x4224e8], eax
mov ax, word [0x423908]
mov cx, word [0x42269c]
cwde
movsx edx, cx
mov ecx, dword [0x4224e8]
sub eax, edx
sub eax, ecx
mov ecx, dword [ebp - 0x24]
add eax, 0x3fdb7d2d
mov word [0x423908], ax
test ecx, ecx
jl 0x408676
mov eax, dword [ebx + 0x14]
sub eax, edi
cmp eax, ecx
jae 0x4086b6
fld dword [ebp - 0x18]
fsub qword [0x41e708]
fsub qword [ebp - 0x4c]
fmul qword [ebp - 0x2c]
cmp dword [ebp + 0x1458], 0
fstp qword [ebp - 0x2c]
je 0x40875a
movzx edx, word [0x4234b0]
imul edx, edx, 0x2c8144b
mov word [0x4234b0], dx
cmp dword [ebx + 0x14], 0x4000
jb 0x40875a
mov eax, dword [ebp - 0x14]
push eax
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
test edi, edi
jl 0x4086d2
push edi
push 0
mov ecx, ebx
call fcn.00405220
mov cl, byte [ebp + 0x1454]
test cl, cl
je 0x40873d
or edi, 0xffffffff
add dword [ebp - 0x20], edi
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], edx
fild dword [ebp - 0x1c]
xor eax, eax
lea edx, [edi + 0x11]
fmul qword [ebp - 0x2c]
fstp qword [ebp - 0x2c]
cmp eax, dword [ebx + 0x14]
jae 0x408713
cmp dword [ebx + 0x18], edx
jb 0x408709
mov esi, dword [ebx + 4]
xor byte [esi + eax], cl
inc eax
jmp 0x4086f6
xor byte [ebx + eax + 4], cl
lea esi, [ebx + 4]
inc eax
jmp 0x4086f6
fld dword [0x4238c4]
fld dword [ebp - 0x34]
mov eax, dword [0x423f44]
mov dword [ebp - 0x1c], eax
fisub dword [ebp - 0x1c]
fadd dword [0x42390c]
fsubp st(1)
fstp dword [0x4238c4]
add dword [0x423f44], edi
jmp 0x408742
mov edx, 0x10
cmp dword [ebp + 0x1b8], edx
jb 0x408408
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x408400
fld qword [ebp - 0x2c]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [ebp - 0x2c]
fld dword [ebp - 0x18]
fadd qword [0x41e700]
fsub qword [ebp - 0x2c]
fld qword [ebp - 0x2c]
fsub qword [0x41e6f8]
fcompp
fnstsw ax
fld dword [ebp - 0x18]
fadd st(1)
fstp dword [ebp - 0x18]
test ah, 0x41
jp 0x4084f7
fsubr dword [ebp - 0x34]
fstp dword [ebp - 0x34]
fld dword [ebp - 0x34]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], edx
fimul dword [ebp - 0x1c]
call fcn.0040a7e0
mov dword [ebp - 0x20], eax
jmp 0x4084f9