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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x427a30
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x43217c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov ebx, edx
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], eax
cmp ebx, eax
je 0x404215
cmp edi, eax
je 0x404215
cmp dword [ebp + 8], eax
je 0x404215
push str.FILES
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
jne 0x4040ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x14], esi
push edi
push str.FILES
push str.Find_Resource_Fail_____s____s_
mov ecx, 0x434070
call fcn.00402cb0
add esp, 0xc
mov dword [ebp - 0x20], esi
push 0x42fd58
lea eax, [ebp - 0x20]
push eax
call fcn.0040a7d8
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
jne 0x404126
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x14], esi
push str.Get_Resource_size_Fail__
mov ecx, 0x434070
call fcn.00402cb0
add esp, 4
mov dword [ebp - 0x24], esi
push 0x42fd58
lea ecx, [ebp - 0x24]
push ecx
call fcn.0040a7d8
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
mov dword [ebp - 0x18], ebx
test ebx, ebx
jne 0x404165
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x14], esi
push str.Load_Resource_Fail__
mov ecx, 0x434070
call fcn.00402cb0
add esp, 4
mov dword [ebp - 0x28], esi
push 0x42fd58
lea edx, [ebp - 0x28]
push edx
call fcn.0040a7d8
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x4041a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x14], esi
push str.Lock_Resource_Fail__
mov ecx, 0x434070
call fcn.00402cb0
add esp, 4
mov dword [ebp - 0x2c], esi
push 0x42fd58
lea eax, [ebp - 0x2c]
push eax
call fcn.0040a7d8
mov dword [ebp - 0x1c], 0
push edi
push str.Write_File___d_
mov ecx, 0x434070
call fcn.00402cb0
add esp, 8
push 0
lea ecx, [ebp - 0x1c]
push ecx
push edi
push esi
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, 0x434070
test eax, eax
je 0x4041f6
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x1c]
push eax
push str.Write_File_success___d_
call fcn.00402cb0
add esp, 8
mov dword [ebp - 4], 0xffffffff
jmp 0x404275
push str.Write_File_Fail___
call fcn.00402cb0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0xffffffff
jmp 0x404275
mov dword [ebp - 0x30], 0x57
push 0x42fd58
lea ecx, [ebp - 0x30]
push ecx
call fcn.0040a7d8
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x14], ecx
test ecx, ecx
je 0x404246
push str.CPackage::GetResource
mov edx, 0x434070
call fcn.00402b70
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, 0x404272
ret
test ebx, ebx
je 0x404280
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4