Function at 0x40c785
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0xe4
mov eax, 0x44f691
call fcn.0042ab7f
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.00403425
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.0040c422
lea ecx, [ebp - 0xf0]
mov byte [ebp - 4], 0
mov bl, al
call fcn.004023b6
test bl, bl
jne 0x40c812
lea eax, [ebp - 0xf0]
push eax
lea ecx, [ebp - 0x28]
call fcn.00403425
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.0040c672
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 0x40ca9e
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40c85c
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 0x40cac2
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
jne 0x40c889
push str.Resource_could_not_be_locked.
lea ecx, [ebp - 0xd0]
call fcn.00401160
push 0x469910
lea eax, [ebp - 0xd0]
jmp 0x40cad8
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
jne 0x40c8c1
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 0x40cac2
push 0x30
lea eax, [ebp - 0xb8]
push 0
push eax
call fcn.0042c200
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 0x40c910
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.0040cc32
mov byte [ebp - 4], 3
cmp dword [ebp - 0xb8], 0xffffffff
jne 0x40c952
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 0x40cac2
push 0x30
lea eax, [ebp - 0x88]
push 0
push eax
call fcn.0042c200
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 0x40c992
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.0040cc32
mov byte [ebp - 4], 4
cmp dword [ebp - 0x88], 0
jne 0x40c9d4
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 0x40cac2
push 0x30
lea eax, [ebp - 0x58]
push 0
push eax
call fcn.0042c200
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 0x40ca16
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.0040cc32
mov byte [ebp - 4], 5
cmp dword [ebp - 0x58], 0
jne 0x40ca65
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 0x40cad8
push edi
push ebx
push dword [ebp - 0x58]
call fcn.0042bc70
add esp, 0xc
lea ecx, [ebp - 0x58]
call fcn.0040cbc2
lea ecx, [ebp - 0x88]
call fcn.0040cbc2
lea ecx, [ebp - 0xb8]
call fcn.0040cbc2
lea ecx, [ebp - 0x28]
call fcn.004023b6
call fcn.0042ab2e
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.0042bbfc
int3