Function at 0x404030
Capabilities:
Delete file
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x560c78
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x5bee64]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
call fcn.00409fd7
push 0x59e4e4
push 0x86
mov eax, dword [eax + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
jne 0x4040d5
push 0x86
lea eax, [ebp - 0x14]
push str.Failed_to_find_resource__d.
push eax
call fcn.00405330
add esp, 0xc
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x30]
mov esi, dword [eax]
push 9
push str.CResourcesExtractor::ExtractFile
push str.ResourcesExtractor.cpp
call fcn.00405880
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
push esi
mov dword [ebp - 0x30], vtable.Error::C2ExceptionText.0
call fcn.00402b20
mov byte [ebp - 4], 0
lea eax, [ebp - 0x30]
push 0x5ba268
push eax
call fcn.00546130
call fcn.00409fd7
push esi
mov eax, dword [eax + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
jne 0x404144
push 0x86
lea eax, [ebp - 0x14]
push str.Failed_to_load_resource__d.
push eax
call fcn.00405330
add esp, 0xc
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x30]
mov esi, dword [eax]
push 0xb
push str.CResourcesExtractor::ExtractFile
push str.ResourcesExtractor.cpp
call fcn.00405880
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x20]
push esi
mov dword [ebp - 0x30], vtable.Error::C2ExceptionText.0
call fcn.00402b20
mov byte [ebp - 4], 3
lea eax, [ebp - 0x30]
push 0x5ba268
push eax
call fcn.00546130
call fcn.00409fd7
push esi
mov eax, dword [eax + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4041b4
push 0x86
lea eax, [ebp - 0x14]
push str.Resource__d_is_empty.
push eax
call fcn.00405330
add esp, 0xc
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x30]
mov esi, dword [eax]
push 0xd
push str.CResourcesExtractor::ExtractFile
push str.ResourcesExtractor.cpp
call fcn.00405880
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x20]
push esi
mov dword [ebp - 0x30], vtable.Error::C2ExceptionText.0
call fcn.00402b20
mov byte [ebp - 4], 6
lea eax, [ebp - 0x30]
push 0x5ba268
push eax
call fcn.00546130
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push edi
mov esi, eax
mov dword [ebp - 0x1c], vtable.C2FileWrite.0
mov dword [ebp - 0x18], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 9
lea ecx, [ebp - 0x10]
push 0
push ecx
push dword [ebp - 0x14]
mov dword [ebp - 0x10], 0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40425c
push edi
lea eax, [ebp - 0x14]
push str.Failed_to_write_to_file__s
push eax
call fcn.00405330
add esp, 0xc
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x30]
mov esi, dword [eax]
push 0x13
push str.CResourcesExtractor::ExtractFile
push str.ResourcesExtractor.cpp
call fcn.00405880
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x20]
push esi
mov dword [ebp - 0x30], vtable.Error::C2ExceptionText.0
call fcn.00402b20
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x30]
push 0x5ba268
push eax
call fcn.00546130
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.00403480
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret