Function at 0x10052bcb
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
push 0x354
mov eax, 0x1006d560
call fcn.1005416a
mov esi, dword [ebp + 0xc]
xor ebx, ebx
test esi, esi
jne 0x10052db4
call sym.DuiLib32.dll_public:_static_class_DuiLib::CDuiString_const____cdecl_DuiLib::CPaintManagerUI::GetResourcePath_void_
push eax
lea ecx, [ebp - 0x94]
call sym.DuiLib32.dll_public:_void___thiscall_DuiLib::CDuiString::constructor_class_DuiLib::CDuiString_const__
mov dword [ebp - 4], ebx
call sym.DuiLib32.dll_public:_static_class_DuiLib::CDuiString_const____cdecl_DuiLib::CPaintManagerUI::GetResourceZip_void_
mov ecx, eax
call sym.DuiLib32.dll_public:_bool___thiscall_DuiLib::CDuiString::IsEmpty_void_const
test al, al
je 0x10052cb8
push dword [ebp + 8]
lea ecx, [ebp - 0x94]
call sym.DuiLib32.dll_public:_class_DuiLib::CDuiString_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
lea ecx, [ebp - 0x94]
call sym.DuiLib32.dll_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x34c], eax
cmp eax, 0xffffffff
jne 0x10052c5e
lea ecx, [ebp - 0x94]
or dword [ebp - 4], 0xffffffff
call sym.DuiLib32.dll_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x10052f6e
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x10052c4a
push edi
mov dword [ebp - 0x354], ebx
call fcn.100540e3
pop ecx
push ebx
mov esi, eax
mov dword [ebp - 0x350], eax
lea eax, [ebp - 0x354]
push eax
push edi
push esi
push dword [ebp - 0x34c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x34c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x354], edi
je 0x10052d9a
push esi
call fcn.100540ec
pop ecx
jmp 0x10052c4a
call sym.DuiLib32.dll_public:_static_class_DuiLib::CDuiString_const____cdecl_DuiLib::CPaintManagerUI::GetResourceZip_void_
push eax
lea ecx, [ebp - 0x94]
call sym.DuiLib32.dll_public:_class_DuiLib::CDuiString_const____thiscall_DuiLib::CDuiString::operator_class_DuiLib::CDuiString_const__
call sym.DuiLib32.dll_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
test al, al
je 0x10052cd9
call sym.DuiLib32.dll_public:_static_void____cdecl_DuiLib::CPaintManagerUI::GetResourceZipHandle_void_
jmp 0x10052cf0
push 2
push ebx
lea ecx, [ebp - 0x94]
call sym.DuiLib32.dll_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call fcn.1002801b
add esp, 0xc
mov dword [ebp - 0x34c], eax
test eax, eax
je 0x10052c4a
lea ecx, [ebp - 0x348]
push ecx
lea ecx, [ebp - 0x358]
push ecx
push 1
push dword [ebp + 8]
push eax
call fcn.10027a5c
add esp, 0x14
test eax, eax
jne 0x10052c4a
mov edi, dword [ebp - 0x11c]
test edi, edi
je 0x10052c4a
push edi
call fcn.100540e3
push 3
mov esi, eax
push edi
push esi
push dword [ebp - 0x358]
mov dword [ebp - 0x350], esi
push dword [ebp - 0x34c]
call fcn.100283db
add esp, 0x18
test eax, eax
je 0x10052d85
cmp eax, 0x600
je 0x10052d85
push esi
call fcn.100540ec
pop ecx
call sym.DuiLib32.dll_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
test al, al
jne 0x10052c4a
push dword [ebp - 0x34c]
call fcn.100278b6
jmp 0x10052cb5
call sym.DuiLib32.dll_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
test al, al
jne 0x10052d9a
push dword [ebp - 0x34c]
call fcn.100278b6
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call sym.DuiLib32.dll_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
mov esi, dword [ebp - 0x350]
jmp 0x10052f66
push str.fullpath
push esi
call fcn.1005989b
pop ecx
pop ecx
test eax, eax
jne 0x10052e7a
push 0xffffffffffffffff
push dword [ebp + 8]
lea ecx, [ebp - 0x118]
call sym.DuiLib32.dll_public:_void___thiscall_DuiLib::CDuiString::constructor_wchar_t_const___int_
push ebx
push 0x80
push 3
xor eax, eax
lea ecx, [ebp - 0x118]
inc eax
push ebx
push eax
push SysReAllocString
mov dword [ebp - 4], eax
call sym.DuiLib32.dll_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x354], eax
cmp eax, 0xffffffff
jne 0x10052e16
lea ecx, [ebp - 0x118]
jmp 0x10052c50
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x10052e0b
push edi
mov dword [ebp - 0x350], ebx
call fcn.100540e3
pop ecx
push ebx
mov esi, eax
lea eax, [ebp - 0x350]
push eax
push edi
push esi
push dword [ebp - 0x354]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x354]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x350], edi
je 0x10052e66
push esi
call fcn.100540ec
pop ecx
jmp 0x10052e0b
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x118]
call sym.DuiLib32.dll_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x10052f66
push str.respath
push esi
call fcn.1005989b
pop ecx
pop ecx
test eax, eax
jne 0x10052eec
call sym.DuiLib32.dll_public:_static_struct_HINSTANCE______cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
push 0x10077bd0
push dword [ebp + 8]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x358], eax
test eax, eax
je 0x10053059
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x10052f6e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push dword [ebp - 0x358]
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
push edi
call fcn.100540e3
push edi
push esi
mov esi, eax
push esi
call fcn.10055340
add esp, 0x10
jmp 0x10052f66
push esi
push dword [ebp + 8]
call sym.DuiLib32.dll_public:_static_struct_HINSTANCE______cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [ebp - 0x35c], esi
test esi, esi
je 0x10052f6e
push esi
call sym.DuiLib32.dll_public:_static_struct_HINSTANCE______cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x358], eax
push esi
test eax, eax
jne 0x10052f28
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x10052f6e
call sym.DuiLib32.dll_public:_static_struct_HINSTANCE______cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x10052f6e
push edi
call fcn.100540e3
pop ecx
push edi
push dword [ebp - 0x358]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push esi
call fcn.10055340
add esp, 0xc
push dword [ebp - 0x35c]
call dword [sym.imp.KERNEL32.dll_FreeResource]
test esi, esi
jne 0x10052fee
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x34c], eax
cmp eax, 0xffffffff
je 0x10053059
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x10053059
push edi
mov dword [ebp - 0x35c], ebx
call fcn.100540e3
pop ecx
push ebx
mov esi, eax
lea eax, [ebp - 0x35c]
push eax
push edi
push esi
push dword [ebp - 0x34c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x34c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x35c], edi
je 0x10052fea
push esi
call fcn.100540ec
pop ecx
mov esi, ebx
test esi, esi
je 0x10053059
push edi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x360], eax
test eax, eax
je 0x10053055
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x10053055
push edi
push esi
push eax
mov dword [ebp - 0x34c], ebx
call fcn.10055340
mov esi, dword [ebp - 0x360]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
lea eax, [ebp - 0x34c]
push eax
push 1
push esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jne 0x1005304e
push ebx
push dword [ebp - 0x34c]
call fcn.100520b9
pop ecx
pop ecx
mov ebx, eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, ebx
jmp 0x1005305b
xor eax, eax
call fcn.10054125
ret