Function at 0x40c230
Capabilities:
Read and send data from client to server
Read data from internet
Read file on windows
Receive data
Send data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x428
mov eax, dword [0x4fa078]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov eax, dword [esi + 4]
cmp eax, dword [esi + 8]
jne 0x40c256
mov eax, dword [esi + 0x10]
cmp eax, dword [esi + 0x14]
je 0x40c25f
call fcn.0040bd70
test al, al
jne 0x40c270
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044b7d5
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0
push ebx
push edi
mov dword [esi + 0x3ac], 0
mov byte [ebp - 0x415], 0
je 0x40c2ca
mov ecx, dword [esi + 8]
mov eax, 0x38e38e39
mov edi, dword [esi + 4]
sub ecx, edi
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40c5fc
cmp dword [edi + 0x44], 0x10
lea eax, [edi + 0x30]
jb 0x40c2b2
mov eax, dword [eax]
push dword [edi + 0x40]
mov ecx, esi
push eax
call fcn.0040c1c0
test al, al
je 0x40c6ec
jmp 0x40c5fc
lea edx, [esi + 0x166]
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40c2d5
sub ecx, edi
push ecx
push edx
mov ecx, esi
call fcn.0040c1c0
test al, al
je 0x40c6ec
lea ebx, [esi + 0x1e6]
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x40c2f8
sub ebx, ecx
mov eax, 0x38e38e39
mov ecx, dword [esi + 8]
mov edi, 0
sub ecx, dword [esi + 4]
imul ecx
mov dword [ebp - 0x41c], ebx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x408], eax
je 0x40c3b1
xor ebx, ebx
mov eax, dword [esi + 4]
mov ecx, dword [ebx + eax + 0x40]
add eax, 0x30
add eax, ebx
cmp dword [eax + 0x14], 0x10
jb 0x40c345
mov eax, dword [eax]
lea edx, [ebp - 0x40c]
mov dword [ebp - 0x40c], 0
push edx
push ecx
push eax
push dword [esi + 0x380]
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
je 0x40c6ec
mov eax, dword [ebp - 0x40c]
add dword [esi + 0x3ac], eax
mov eax, dword [ebp - 0x408]
dec eax
cmp edi, eax
jae 0x40c39f
push dword [ebp - 0x41c]
lea eax, [esi + 0x1e6]
mov ecx, esi
push eax
call fcn.0040c1c0
test al, al
je 0x40c6ec
inc edi
add ebx, 0x48
cmp edi, dword [ebp - 0x408]
jb 0x40c331
mov ebx, dword [ebp - 0x41c]
mov ecx, dword [esi + 0x14]
mov eax, 0x66666667
sub ecx, dword [esi + 0x10]
imul ecx
sar edx, 5
mov edi, edx
shr edi, 0x1f
add edi, edx
cmp dword [ebp - 0x408], 0
mov dword [ebp - 0x410], edi
jbe 0x40c3f2
test edi, edi
je 0x40c3f2
push ebx
lea eax, [esi + 0x1e6]
mov ecx, esi
push eax
call fcn.0040c1c0
test al, al
je 0x40c6ec
mov dword [ebp - 0x420], 0
test edi, edi
je 0x40c5b1
xor edi, edi
mov dword [ebp - 0x424], edi
nop dword [eax]
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + edi + 0x28]
add eax, 0x18
add eax, edi
cmp dword [eax + 0x14], 0x10
jb 0x40c424
mov eax, dword [eax]
mov ebx, dword [sym.imp.WININET.dll_InternetWriteFile]
lea edx, [ebp - 0x40c]
push edx
push ecx
push eax
push dword [esi + 0x380]
mov dword [ebp - 0x40c], 0
call ebx
test eax, eax
je 0x40c6ec
mov eax, dword [ebp - 0x40c]
add dword [esi + 0x3ac], eax
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + edi + 0x40]
add eax, 0x30
add eax, edi
cmp dword [eax + 0x14], 0x10
jb 0x40c46d
mov eax, dword [eax]
lea edx, [ebp - 0x40c]
mov dword [ebp - 0x40c], 0
push edx
push ecx
push eax
push dword [esi + 0x380]
call ebx
test eax, eax
je 0x40c6ec
mov eax, dword [ebp - 0x40c]
add dword [esi + 0x3ac], eax
mov eax, dword [esi + 0x10]
push 0x400
mov ecx, dword [eax + edi + 0x48]
mov eax, dword [eax + edi + 0x4c]
mov dword [ebp - 0x428], ecx
mov dword [ebp - 0x40c], eax
call fcn.0044bf52
add esp, 4
mov edi, eax
xor ebx, ebx
lea eax, [ebp - 0x408]
mov dword [ebp - 0x408], ebx
push ebx
push eax
push 0x400
push edi
push dword [ebp - 0x40c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40c549
nop dword [eax + eax]
lea eax, [ebp - 0x414]
mov dword [ebp - 0x414], 0
push eax
push dword [ebp - 0x408]
push edi
push dword [esi + 0x380]
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
je 0x40c549
mov eax, dword [ebp - 0x414]
add dword [esi + 0x3ac], eax
lea eax, [ebp - 0x408]
add ebx, dword [ebp - 0x408]
push 0
push eax
push 0x400
push edi
push dword [ebp - 0x40c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c4f0
test edi, edi
je 0x40c556
push edi
call fcn.0044b7e6
add esp, 4
cmp ebx, dword [ebp - 0x428]
jne 0x40c6ec
mov eax, dword [ebp - 0x410]
mov ebx, dword [ebp - 0x420]
dec eax
cmp ebx, eax
jae 0x40c58f
push dword [ebp - 0x41c]
lea eax, [esi + 0x1e6]
mov ecx, esi
push eax
call fcn.0040c1c0
test al, al
je 0x40c6ec
mov edi, dword [ebp - 0x424]
inc ebx
add edi, 0x50
mov dword [ebp - 0x420], ebx
mov dword [ebp - 0x424], edi
cmp ebx, dword [ebp - 0x410]
jb 0x40c410
lea edx, [esi + 0x266]
mov ecx, edx
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40c5c0
lea eax, [ebp - 0x410]
mov dword [ebp - 0x410], 0
push eax
sub ecx, edi
push ecx
push edx
push dword [esi + 0x380]
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
je 0x40c6ec
mov eax, dword [ebp - 0x410]
add dword [esi + 0x3ac], eax
mov ecx, dword [esi + 0x3ac]
cmp ecx, dword [esi + 0x3a0]
sete byte [ebp - 0x415]
jne 0x40c6ec
push 0
push 0
push 0
push dword [esi + 0x380]
call dword [sym.imp.WININET.dll_HttpEndRequestW]
cmp dword [esi + 0x3c4], 0x10
lea eax, [esi + 0x3b0]
mov dword [esi + 0x3c0], 0
jb 0x40c646
mov eax, dword [esi + 0x3b0]
mov byte [eax], 0
lea eax, [ebp - 0x404]
push 0x400
push 0
push eax
mov dword [ebp - 0x408], 0
call fcn.004a4b20
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
lea eax, [ebp - 0x408]
add esp, 0xc
push eax
push 0x400
lea eax, [ebp - 0x404]
push eax
push dword [esi + 0x380]
call ebx
test eax, eax
je 0x40c6ec
nop
mov eax, dword [ebp - 0x408]
test eax, eax
je 0x40c6ec
push eax
lea eax, [ebp - 0x404]
push eax
lea ecx, [esi + 0x3b0]
call fcn.00407140
push 0x400
lea eax, [ebp - 0x404]
mov dword [ebp - 0x408], 0
push 0
push eax
call fcn.004a4b20
add esp, 0xc
lea eax, [ebp - 0x408]
push eax
push 0x400
lea eax, [ebp - 0x404]
push eax
push dword [esi + 0x380]
call ebx
test eax, eax
jne 0x40c690
mov ecx, esi
call fcn.0040c130
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x415]
xor ecx, ebp
pop edi
pop ebx
pop esi
call fcn.0044b7d5
mov esp, ebp
pop ebp
ret