Function at 0x4ca880
Capabilities:
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dc7d0
mov eax, dword fs:[0]
push eax
sub esp, 0x4b8
mov eax, dword [0x506380]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x13c], 0xffffffff
mov dword [ebp - 0x390], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x138], 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x5c4]
and ecx, 4
je 0x4ca905
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
add eax, 0x124
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004ca020
add esp, 0xc
movzx edx, al
test edx, edx
jne 0x4ca905
xor al, al
jmp 0x4cac1e
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov ecx, dword [ebp + 8]
add ecx, 0x124
call fcn.004d2d70
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x13c], eax
cmp dword [ebp - 0x13c], 0xffffffff
jne 0x4ca984
mov eax, dword [ebp + 8]
mov dword [eax + 0x5d8], 9
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x5b4], 0xa
push 0x4f4ccc
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3670
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3360
xor al, al
jmp 0x4cac1e
push 0
lea ecx, [ebp - 0x254]
call fcn.00406670
mov dword [ebp - 4], 0
push 0
lea ecx, [ebp - 0x134]
call fcn.00406670
mov byte [ebp - 4], 1
mov dword [ebp - 0x14], 0
push 0x19000
push 0
lea ecx, [ebp - 0x254]
call fcn.004067d0
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x390], 0
jbe 0x4caa3a
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x390]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x394], 0
mov ecx, dword [ebp + 8]
call fcn.004065b0
movzx eax, al
test eax, eax
je 0x4caa19
mov ecx, dword [ebp - 0x390]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x14]
push eax
lea ecx, [ebp - 0x134]
call fcn.004066e0
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0x390]
mov dword [ebp - 0x14], ecx
push 0
lea edx, [ebp - 0x394]
push edx
mov eax, dword [ebp - 0x390]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x13c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x390]
push eax
push 0x19000
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov dword [ebp - 0x138], eax
cmp dword [ebp - 0x138], 0
je 0x4caa70
cmp dword [ebp - 0x390], 0
ja 0x4ca9c5
cmp dword [ebp - 0x138], 0
jne 0x4caaab
mov eax, dword [ebp + 8]
mov dword [eax + 0x5b4], 0xb
push str.contlen
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3670
mov ecx, dword [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3360
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x18]
mov dword [edx + 0x5d0], eax
cmp dword [ebp - 0x13c], 0xffffffff
je 0x4cab4c
push 0x10000000
push 1
mov ecx, dword [ebp - 0x13c]
push ecx
call fcn.004cf9f0
add esp, 0xc
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp + 8]
add ecx, 0x124
call fcn.004d2d40
push eax
lea ecx, [ebp - 0x4bc]
call fcn.004d7f50
mov byte [ebp - 4], 2
push 0x4f4cf4
lea ecx, [ebp - 0x4bc]
call fcn.004d7780
push eax
call fcn.0041a656
add esp, 8
test eax, eax
je 0x4cab30
push 1
mov edx, dword [ebp - 0x13c]
push edx
call fcn.004cfc50
add esp, 8
mov eax, dword [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4bc]
call fcn.004d78b0
lea ecx, [ebp - 0x260]
call fcn.004d37b0
mov byte [ebp - 4], 3
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp + 8]
add ecx, 0x124
call fcn.004d2d40
push eax
lea ecx, [ebp - 0x38c]
call fcn.004d7f50
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x38c]
push ecx
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x260]
push eax
call fcn.004ca5b0
add esp, 0xc
mov byte [ebp - 0x255], al
cmp dword [ebp - 0x138], 0
je 0x4cabc3
movzx ecx, byte [ebp - 0x255]
test ecx, ecx
je 0x4cabc3
mov dword [ebp - 0x4c4], 1
jmp 0x4cabcd
mov dword [ebp - 0x4c4], 0
mov dl, byte [ebp - 0x4c4]
mov byte [ebp - 0x4bd], dl
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x38c]
call fcn.004d78b0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x260]
call fcn.004d37f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x134]
call fcn.00406650
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x254]
call fcn.00406650
mov al, byte [ebp - 0x4bd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0041a0cf
mov esp, ebp
pop ebp
ret