Function at 0x401000
Capabilities:
Create process on windows
Create process suspended
Delete file
Extract resource via kernel32 functions
Get common file path
Resume thread
Terminate process

Disassembly:
sub esp, 0x364
push ebx
xor eax, eax
push ebp
push esi
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x60]
push edi
xor ebx, ebx
mov dword [esp + 0x18], eax
push ecx
push 0x104
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], 0x44
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x54], ebx
mov word [esp + 0x5a], bx
mov dword [esp + 0x5c], ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp eax, 0x104
jbe 0x401073
mov edx, dword [str.C:TEMP_]
mov eax, dword [0x4050f0]
mov cl, byte [0x4050f4]
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], eax
mov byte [esp + 0x6c], cl
mov esi, dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea edx, [esp + 0x16c]
push edx
push ebx
lea eax, [esp + 0x6c]
push str.diab
push eax
call esi
lea ecx, [esp + 0x270]
lea edx, [esp + 0x64]
push ecx
push ebx
push str.diab
push edx
call esi
push 0x4050dc
push 0x66
mov esi, dword [esp + 0x380]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
cmp edi, ebx
je 0x4012a7
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push edi
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
test ebx, ebx
mov ebp, eax
je 0x40110d
test ebp, ebp
je 0x40110d
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x40110d
lea eax, [esp + 0x16c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
mov edi, eax
push ebp
push ebx
push edi
call dword [sym.imp.KERNEL32.dll__hwrite]
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
push 0x4050dc
push 0x65
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x4012a7
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push edi
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
test ebx, ebx
mov ebp, eax
je 0x401170
test ebp, ebp
je 0x401170
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x401170
lea ecx, [esp + 0x270]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll__lcreat]
mov esi, eax
push ebp
push edi
push esi
call dword [sym.imp.KERNEL32.dll__hwrite]
push esi
call dword [sym.imp.KERNEL32.dll__lclose]
lea edx, [esp + 0x16c]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, eax
test esi, esi
je 0x401249
push 0x4050c8
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [0x407570], eax
je 0x40123b
lea eax, [esp + 0x10]
mov edx, dword [esp + 0x380]
lea ecx, [esp + 0x20]
push eax
push ecx
push 0
push 0
push 4
push 0
push 0
push 0
push edx
push 0x4050b8
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40122d
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x270]
push eax
push ecx
call dword [0x407570]
test eax, eax
je 0x401220
push 0
push str.oops..
push str.Error_establishing_ApiHooks
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0x2710
call edi
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x40125d
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x40125d
push 0
push str.Error
push str.Cant_execute_game_crk.exe_in_current_Dir.
jmp 0x401255
push 0
push str.oops..
push str.Error_geting_ApiHooks_entrypoint
jmp 0x401255
push 0
push str.oops.._:_
push str.Internal_Error
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
test esi, esi
je 0x401268
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401279
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x3e8
call edi
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edx, [esp + 0x16c]
push edx
call esi
lea eax, [esp + 0x270]
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x364
ret 0x10
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x364
ret 0x10