Function at 0x40c765
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0xe4
mov eax, 0x44f681
call fcn.0042ab6f
mov eax, edx
mov dword [ebp - 0xc0], eax
mov esi, ecx
mov edi, dword [ebp + 8]
mov dword [ebp - 0xbc], eax
lea eax, [ebp - 0xbc]
push ecx
push eax
lea ecx, [ebp - 0x28]
call fcn.004024e3
and dword [ebp - 4], 0
lea eax, [ebp - 0xf0]
push eax
lea ecx, [ebp - 0x28]
call fcn.00403465
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.0040c402
lea ecx, [ebp - 0xf0]
mov byte [ebp - 4], 0
mov bl, al
call fcn.004023b6
test bl, bl
jne 0x40c7f2
lea eax, [ebp - 0xf0]
push eax
lea ecx, [ebp - 0x28]
call fcn.00403465
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.0040c652
lea ecx, [ebp - 0xf0]
mov byte [ebp - 4], bl
call fcn.004023b6
push edi
push esi
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x40ca7e
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40c83c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00401715
push eax
push ecx
lea ecx, [ebp - 0xc4]
call fcn.0040132b
push dword [eax + 4]
push dword [eax]
push str.Resource_could_not_be_loaded.
jmp 0x40caa2
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
jne 0x40c869
push str.Resource_could_not_be_locked.
lea ecx, [ebp - 0xd0]
call fcn.00401160
push 0x469910
lea eax, [ebp - 0xd0]
jmp 0x40cab8
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
jne 0x40c8a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00401715
push eax
push ecx
lea ecx, [ebp - 0xc4]
call fcn.0040132b
push dword [eax + 4]
push dword [eax]
push str.Resource_size_could_not_be_retrieved.
jmp 0x40caa2
push 0x30
lea eax, [ebp - 0xb8]
push 0
push eax
call fcn.0042c3a0
add esp, 0xc
xor eax, eax
push eax
push 0x80
push 2
push eax
push eax
push 0xc0000000
push dword [ebp - 0xc0]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 0x28
mov ecx, esp
and dword [ecx + 0x24], 0
test esi, esi
je 0x40c8f0
mov dword [ecx], vtable.std::_Func_impl_no_alloc_int____stdcall___void____void__void__.0
mov dword [ecx + 4], esi
mov dword [ecx + 0x24], ecx
push eax
lea ecx, [ebp - 0xb8]
call fcn.0040cc12
mov byte [ebp - 4], 3
cmp dword [ebp - 0xb8], 0xffffffff
jne 0x40c932
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00401715
push eax
push ecx
lea ecx, [ebp - 0xc4]
call fcn.0040132b
push dword [eax + 4]
push dword [eax]
push str.Failed_to_create_file
jmp 0x40caa2
push 0x30
lea eax, [ebp - 0x88]
push 0
push eax
call fcn.0042c3a0
add esp, 0xc
xor eax, eax
push eax
push edi
push eax
push 4
push eax
push dword [ebp - 0xb8]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
sub esp, 0x28
mov ecx, esp
and dword [ecx + 0x24], 0
test esi, esi
je 0x40c972
mov dword [ecx], vtable.std::_Func_impl_no_alloc_int____stdcall___void____void__void__.0
mov dword [ecx + 4], esi
mov dword [ecx + 0x24], ecx
push eax
lea ecx, [ebp - 0x88]
call fcn.0040cc12
mov byte [ebp - 4], 4
cmp dword [ebp - 0x88], 0
jne 0x40c9b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00401715
push eax
push ecx
lea ecx, [ebp - 0xc4]
call fcn.0040132b
push dword [eax + 4]
push dword [eax]
push str.Could_not_create_file_mapping.
jmp 0x40caa2
push 0x30
lea eax, [ebp - 0x58]
push 0
push eax
call fcn.0042c3a0
add esp, 0xc
xor eax, eax
push eax
push eax
push eax
push 2
push dword [ebp - 0x88]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edx, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
sub esp, 0x28
mov ecx, esp
and dword [ecx + 0x24], 0
test edx, edx
je 0x40c9f6
mov dword [ecx], vtable.std::_Func_impl_no_alloc_int____stdcall___void_const____void__void__.0
mov dword [ecx + 4], edx
mov dword [ecx + 0x24], ecx
push eax
lea ecx, [ebp - 0x58]
call fcn.0040cc12
mov byte [ebp - 4], 5
cmp dword [ebp - 0x58], 0
jne 0x40ca45
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00401715
push eax
push ecx
lea ecx, [ebp - 0xcc]
call fcn.0040132b
lea ecx, [ebp - 0xec]
push dword [eax + 4]
push dword [eax]
push str.Could_not_map_view_of_file.
call fcn.0040151d
push 0x469824
lea eax, [ebp - 0xec]
jmp 0x40cab8
push edi
push ebx
push dword [ebp - 0x58]
call fcn.0042be10
add esp, 0xc
lea ecx, [ebp - 0x58]
call fcn.0040cba2
lea ecx, [ebp - 0x88]
call fcn.0040cba2
lea ecx, [ebp - 0xb8]
call fcn.0040cba2
lea ecx, [ebp - 0x28]
call fcn.004023b6
call fcn.0042ab1e
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00401715
push eax
push ecx
lea ecx, [ebp - 0xc4]
call fcn.0040132b
push dword [eax + 4]
push dword [eax]
push str.Resource_not_found.
lea ecx, [ebp - 0xd8]
call fcn.0040151d
push 0x469824
lea eax, [ebp - 0xd8]
push eax
call fcn.0042bd9c
int3