Function at 0x410730
Capabilities:
Check http status code
Create http request
Download and write a file
Get file size
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x43fb30
push eax
mov eax, 0x3b34
mov dword fs:[0], esp
call fcn.0041ad80
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x3b54]
mov dword [esp + 0x3b4c], 1
call fcn.0042b045
lea ecx, [esp + 0x3b58]
call fcn.0042b045
mov eax, dword [esp + 0x3b54]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x41097c
mov ecx, dword [esp + 0x3b58]
mov eax, dword [ecx - 8]
test eax, eax
je 0x41097c
push 0
push 0
push 0
push 0
push str.agent_urldown
call dword [sym.imp.WININET.dll_InternetOpenA]
mov esi, eax
test esi, esi
mov dword [esp + 0x18], esi
je 0x41097c
mov edx, dword [esp + 0x3b54]
push 0
push SysReAllocString
push 0
push 0
push edx
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov ebp, eax
test ebp, ebp
jne 0x4107e1
push eax
jmp 0x410971
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
lea eax, [esp + 0x20]
push 0
lea ecx, [esp + 0x50]
push eax
push ecx
mov ebx, 0x2710
push 0x13
push ebp
mov dword [esp + 0x34], ebx
call edi
lea edx, [esp + 0x4c]
push edx
call fcn.0041c2eb
add esp, 4
cmp eax, 0xc8
jne 0x41096b
lea eax, [esp + 0x1c]
push 0
lea ecx, [esp + 0x1438]
push eax
push ecx
push 5
push ebp
mov dword [esp + 0x30], ebx
call edi
lea edx, [esp + 0x1434]
push edx
call fcn.0041c2eb
add esp, 4
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x3b58]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x41097c
mov ecx, 0x3ff
xor eax, eax
lea edi, [esp + 0x438]
mov dword [esp + 0x434], 0
rep stosd dword es:[edi], eax
mov ecx, 0xa
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x434]
xor edi, edi
mov dword [esp + 0x24], 0x28
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], 0x400
mov dword [esp + 0x10], edi
push 0
lea edx, [esp + 0x28]
push 0
push edx
push ebp
call dword [sym.imp.WININET.dll_InternetReadFileExA]
mov esi, eax
test esi, esi
jne 0x4108df
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x3e5
jne 0x4108df
mov esi, 1
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
lea eax, [esp + 0x10]
push 0
push eax
push ecx
push edx
push ebx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
add edi, dword [esp + 0x10]
test esi, esi
je 0x410907
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x4108b7
push 0
push ebx
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call edi
mov eax, dword [esp + 0x18]
push eax
call edi
mov eax, dword [esp + 0x14]
cmp esi, eax
jne 0x41097c
test esi, esi
je 0x41097c
test eax, eax
je 0x41097c
lea ecx, [esp + 0x3b54]
mov byte [esp + 0x3b4c], 0
call fcn.0042cf89
lea ecx, [esp + 0x3b58]
mov dword [esp + 0x3b4c], 0xffffffff
call fcn.0042cf89
mov eax, 1
jmp 0x4109a9
cmp eax, 0x194
push ebp
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push esi
call edi
lea ecx, [esp + 0x3b54]
mov byte [esp + 0x3b4c], 0
call fcn.0042cf89
lea ecx, [esp + 0x3b58]
mov dword [esp + 0x3b4c], 0xffffffff
call fcn.0042cf89
xor eax, eax
mov ecx, dword [esp + 0x3b44]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x3b40
ret 8