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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov dword [ebp - 0x2c], ecx
cmp dword [ebp + 8], 0
je 0x41f35b
cmp dword [ebp + 0xc], 0
je 0x41f35b
cmp dword [ebp + 0x10], 0
jne 0x41f399
push 0x441e30
call fcn.0040de50
add esp, 4
test eax, eax
jne 0x41f392
push 4
push str.Invalid_Args.
mov eax, dword [ebp - 0x2c]
push eax
push 0x441e88
call fcn.0040e820
add esp, 8
mov ecx, eax
call fcn.0040d970
mov ecx, eax
call fcn.0040de00
xor eax, eax
jmp 0x41f761
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x41f400
push 0x441ef0
call fcn.0040de50
add esp, 4
test eax, eax
jne 0x41f3f9
push 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.FindResource_FAILED__Error_Code_
mov ecx, dword [ebp - 0x2c]
push ecx
push 0x441f48
call fcn.0040e820
add esp, 8
mov ecx, eax
call fcn.0040d970
mov ecx, eax
call fcn.0040d7c0
mov ecx, eax
call fcn.0040de00
xor eax, eax
jmp 0x41f761
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x41f463
push 0x441fa0
call fcn.0040de50
add esp, 4
test eax, eax
jne 0x41f45c
push 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Get_Size_of_Resource_FAILED__Error_Code_
mov ecx, dword [ebp - 0x2c]
push ecx
push 0x441ff8
call fcn.0040e820
add esp, 8
mov ecx, eax
call fcn.0040d970
mov ecx, eax
call fcn.0040d7c0
mov ecx, eax
call fcn.0040de00
xor eax, eax
jmp 0x41f761
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x41f4c6
push 0x442078
call fcn.0040de50
add esp, 4
test eax, eax
jne 0x41f4bf
push 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LoadResource_FAILED__Error_Code_
mov ecx, dword [ebp - 0x2c]
push ecx
push 0x4420d0
call fcn.0040e820
add esp, 8
mov ecx, eax
call fcn.0040d970
mov ecx, eax
call fcn.0040d7c0
mov ecx, eax
call fcn.0040de00
xor eax, eax
jmp 0x41f761
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x41f52f
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
push 0x442148
call fcn.0040de50
add esp, 4
test eax, eax
jne 0x41f528
push 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Lock_Resource_FAILED__Error_Code_
mov ecx, dword [ebp - 0x2c]
push ecx
push 0x4421a0
call fcn.0040e820
add esp, 8
mov ecx, eax
call fcn.0040d970
mov ecx, eax
call fcn.0040d7c0
mov ecx, eax
call fcn.0040de00
xor eax, eax
jmp 0x41f761
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x41f5aa
push 0x442218
call fcn.0040de50
add esp, 4
test eax, eax
jne 0x41f599
push 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_File_FAILED__Error_Code
mov eax, dword [ebp - 0x2c]
push eax
push 0x442270
call fcn.0040e820
add esp, 8
mov ecx, eax
call fcn.0040d970
mov ecx, eax
call fcn.0040d7c0
mov ecx, eax
call fcn.0040de00
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeResource]
xor eax, eax
jmp 0x41f761
push 0
push 0
push 0
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x41f615
push 0x4422e8
call fcn.0040de50
add esp, 4
test eax, eax
jne 0x41f604
push 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetFilePointer_FAILED__Error_Code_
mov eax, dword [ebp - 0x2c]
push eax
push 0x442340
call fcn.0040e820
add esp, 8
mov ecx, eax
call fcn.0040d970
mov ecx, eax
call fcn.0040d7c0
mov ecx, eax
call fcn.0040de00
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeResource]
xor eax, eax
jmp 0x41f761
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0x100000
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 0x1c]
jae 0x41f6da
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x18]
cmp dword [ebp - 4], eax
jae 0x41f649
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x30], ecx
jmp 0x41f652
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x18]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], 0
push 0
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41f6cc
push 0x4423c0
call fcn.0040de50
add esp, 4
test eax, eax
jne 0x41f6c3
push 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteFile_FAILED__Error_Code_
mov edx, dword [ebp - 0x2c]
push edx
push 0x442418
call fcn.0040e820
add esp, 8
mov ecx, eax
call fcn.0040d970
mov ecx, eax
call fcn.0040d7c0
mov ecx, eax
call fcn.0040de00
mov dword [ebp - 0x10], 0
jmp 0x41f6da
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x28]
mov dword [ebp - 0x18], eax
jmp 0x41f62a
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_FreeResource]
push 0x4424a0
call fcn.0040de50
add esp, 4
test eax, eax
jne 0x41f75e
push 4
mov eax, dword [ebp - 0x18]
push eax
push str.__Written_Size_
mov ecx, dword [ebp - 0x1c]
push ecx
push str.__Resouce_Size_
mov edx, dword [ebp - 0x10]
push edx
push str.Save_Source.
mov eax, dword [ebp - 0x2c]
push eax
push str.CKKPSetupEnvironment::SaveResourceToFile
call fcn.0040e820
add esp, 8
mov ecx, eax
call fcn.0040d970
mov ecx, eax
call fcn.00423460
mov ecx, eax
call fcn.0040d970
mov ecx, eax
call fcn.0040d7c0
mov ecx, eax
call fcn.0040d970
mov ecx, eax
call fcn.0040d7c0
mov ecx, eax
call fcn.0040de00
mov eax, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret 0x10