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

Disassembly:
sub esp, 0xa30
mov eax, dword [0x4878d4]
xor eax, esp
mov dword [esp + 0xa2c], eax
mov eax, dword [esp + 0xa34]
push ebp
push esi
push edi
xor edi, edi
push edi
push edi
push edi
push edi
push str.http_down_dll
mov esi, ecx
mov dword [esp + 0x30], eax
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebp, eax
cmp ebp, edi
je 0x40f45f
push edi
push SysReAllocString
push edi
push edi
push esi
push ebp
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0xffffffff
jne 0x40f479
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0xa2c]
xor ecx, esp
call fcn.004599ea
add esp, 0xa30
ret
push ebx
mov ebx, dword [sym.imp.WININET.dll_HttpQueryInfoW]
xor eax, eax
push edi
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x432], eax
mov dword [esp + 0x436], eax
mov dword [esp + 0x43a], eax
mov dword [esp + 0x43e], eax
mov word [esp + 0x442], ax
lea eax, [esp + 0x430]
push eax
push 0x13
xor ecx, ecx
push esi
mov word [esp + 0x43c], cx
mov dword [esp + 0x30], 0x14
call ebx
lea ecx, [esp + 0x428]
push ecx
call fcn.0045b2b4
add esp, 4
cmp eax, 0xc8
jne 0x40f585
push 0x3fc
lea edx, [esp + 0x30]
push edi
push edx
mov dword [esp + 0x34], edi
call fcn.0045cac0
add esp, 0xc
push edi
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x30]
push ecx
push 5
push esi
mov dword [esp + 0x38], pe_nt_image_headers32
call ebx
test eax, eax
je 0x40f585
push 0x1fe
lea eax, [esp + 0x442]
xor edx, edx
push edi
push eax
mov word [esp + 0x448], dx
call fcn.0045cac0
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x44c]
push 0x47c170
push edx
call fcn.0045b2d5
lea eax, [esp + 0x454]
push eax
call fcn.0045b2b4
add esp, 0x1c
cmp eax, edi
mov dword [esp + 0x18], eax
jle 0x40f585
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
push 0x47c178
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, edi
jne 0x40f598
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebp
call esi
xor eax, eax
jmp 0x40f663
push 0x3ff
lea ecx, [esp + 0x641]
push edi
push ecx
mov byte [esp + 0x648], 0
call fcn.0045cac0
add esp, 0xc
lea edx, [esp + 0x10]
push edx
push 0x400
lea eax, [esp + 0x644]
push eax
push esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40f624
jmp 0x40f5e0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40f624
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
lea edx, [esp + 0x648]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f624
add edi, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
push 0x400
lea ecx, [esp + 0x644]
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40f5e0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebp
call esi
cmp edi, dword [esp + 0x18]
jne 0x40f591
mov edx, dword [esp + 0x20]
push 0
push edx
push 0x47c178
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0x47c178
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, 1
mov ecx, dword [esp + 0xa3c]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004599ea
add esp, 0xa30
ret