Function at 0x405c70
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417899
mov eax, dword fs:[0]
push eax
sub esp, 0xcbc
mov eax, dword [0x41e494]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, str.ENTERING___________________________________ExtractBinResource
call fcn.00401870
push str.Message__________________Extracting
lea eax, [ebp - 0xc14]
push 0x400
push eax
call fcn.00406d38
add esp, 0xc
push esi
lea ecx, [ebp - 0xc14]
push 0x400
push ecx
call fcn.00407b0d
add esp, 0xc
lea edx, [ebp - 0xc14]
call fcn.00401870
movzx edx, word [ebp + 8]
push str.MAINRES
push edx
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push 0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0x400
push esi
mov edi, eax
push 0x400
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0xc1c]
push ecx
call fcn.00407aed
add esp, 0x14
lea edx, [ebp - 0xcc4]
push edx
call fcn.004033e0
push 0x22
lea ecx, [ebp - 0x414]
lea edx, [ebp - 0xcc0]
mov dword [ebp - 4], 0
call fcn.00403ac0
test eax, eax
jne 0x405d81
mov eax, dword [ebp - 0xcc4]
mov ecx, dword [eax + 4]
mov eax, dword [ebp + ecx - 0xcb8]
lea ecx, [ebp + ecx - 0xcc4]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x405da2
or eax, 4
jmp 0x405da2
mov ecx, dword [ebp - 0xcc4]
mov ecx, dword [ecx + 4]
mov eax, dword [ebp + ecx - 0xc8c]
lea ecx, [ebp + ecx - 0xcc4]
neg eax
sbb eax, eax
and eax, 0xfffffffc
add eax, 4
and eax, 0x17
test dword [ecx + 0x10], eax
mov dword [ecx + 0xc], eax
je 0x405db4
push 0
call fcn.00401530
mov edx, dword [ebp - 0xcc4]
mov eax, dword [edx + 4]
test byte [ebp + eax - 0xcb8], 6
jne 0x405e1d
push 0
push edi
push ebx
lea ecx, [ebp - 0xcc4]
push ecx
call fcn.004023a0
lea eax, [ebp - 0xcc0]
call fcn.00403bb0
test eax, eax
jne 0x405e27
mov edx, dword [ebp - 0xcc4]
mov ecx, dword [edx + 4]
mov eax, dword [ebp + ecx - 0xcb8]
lea ecx, [ebp + ecx - 0xcc4]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x405e09
or eax, 4
and eax, 0x17
mov dword [ecx + 0xc], eax
test dword [ecx + 0x10], eax
je 0x405e27
push 0
call fcn.00401530
jmp 0x405e27
mov edx, str.ERROR____________________Failed_to_open_the_file
call fcn.00401870
mov edx, str.LEAVING___________________________________ExtractBinResource
call fcn.00401870
mov ecx, dword [ebp - 0xcc4]
mov edx, dword [ecx + 4]
lea eax, [ebp - 0xc64]
mov dword [ebp - 0xc18], eax
mov dword [ebp + edx - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
lea ecx, [ebp - 0xcc0]
mov dword [ebp - 4], 1
call fcn.00402a50
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xcc4]
mov ecx, dword [eax + 4]
lea edx, [ebp - 0xc64]
mov dword [ebp + ecx - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
push edx
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00406a4c
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00406d29
mov esp, ebp
pop ebp
ret