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

Disassembly:
push 0x30c
mov eax, 0x11045a13
call fcn.11043260
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp eax, ebx
jne 0x11028af8
call sym.DuiLib_ext.dll_public:_static_class_DuiLib::CDuiString_const____cdecl_DuiLib::CPaintManagerUI::GetResourcePath_void_
push eax
lea ecx, [ebp - 0xc0]
call sym.DuiLib_ext.dll_public:_void___thiscall_DuiLib::CDuiString::constructor_class_DuiLib::CDuiString_const__
mov dword [ebp - 4], ebx
call sym.DuiLib_ext.dll_public:_static_class_DuiLib::CDuiString_const____cdecl_DuiLib::CPaintManagerUI::GetResourceZip_void_
mov ecx, eax
call sym.DuiLib_ext.dll_public:_bool___thiscall_DuiLib::CDuiString::IsEmpty_void_const
test al, al
je 0x11028a06
push dword [ebp + 8]
lea ecx, [ebp - 0xc0]
call sym.DuiLib_ext.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 - 0xc0]
call sym.DuiLib_ext.dll_public:_wchar_t_const____thiscall_DuiLib::CDuiString::GetData_void_const
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x300], eax
cmp eax, 0xffffffff
jne 0x110289b2
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call sym.DuiLib_ext.dll_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x11028b76
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x1102899e
push esi
mov dword [ebp - 0x2f8], ebx
call fcn.1104300a
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x2f8]
push eax
push esi
push edi
push dword [ebp - 0x300]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x300]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2f8], esi
je 0x11028ae7
push edi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
pop ecx
jmp 0x1102899e
call sym.DuiLib_ext.dll_public:_static_class_DuiLib::CDuiString_const____cdecl_DuiLib::CPaintManagerUI::GetResourceZip_void_
push eax
lea ecx, [ebp - 0xc0]
call sym.DuiLib_ext.dll_public:_class_DuiLib::CDuiString_const____thiscall_DuiLib::CDuiString::operator_class_DuiLib::CDuiString_const__
call sym.DuiLib_ext.dll_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
test al, al
je 0x11028a27
call sym.DuiLib_ext.dll_public:_static_void____cdecl_DuiLib::CPaintManagerUI::GetResourceZipHandle_void_
jmp 0x11028a3e
push 2
push ebx
lea ecx, [ebp - 0xc0]
call sym.DuiLib_ext.dll_public:_wchar_t_const____thiscall_DuiLib::CDuiString::GetData_void_const
push eax
call fcn.11015f27
add esp, 0xc
mov dword [ebp - 0x2f8], eax
cmp eax, ebx
je 0x1102899e
lea eax, [ebp - 0x2f0]
push eax
lea eax, [ebp - 0x304]
push eax
push 1
push dword [ebp + 8]
push dword [ebp - 0x2f8]
call fcn.11014615
add esp, 0x14
test eax, eax
jne 0x1102899e
mov esi, dword [ebp - 0xc4]
cmp esi, ebx
je 0x1102899e
push esi
call fcn.1104300a
push 3
push esi
mov edi, eax
push edi
push dword [ebp - 0x304]
push dword [ebp - 0x2f8]
call fcn.11015f85
add esp, 0x18
cmp eax, ebx
je 0x11028ad2
cmp eax, 0x600
je 0x11028ad2
push edi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
pop ecx
call sym.DuiLib_ext.dll_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
test al, al
jne 0x1102899e
push dword [ebp - 0x2f8]
call fcn.11015fc0
jmp 0x11028a03
call sym.DuiLib_ext.dll_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
test al, al
jne 0x11028ae7
push dword [ebp - 0x2f8]
call fcn.11015fc0
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call sym.DuiLib_ext.dll_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x11028b72
push eax
push dword [ebp + 8]
call sym.DuiLib_ext.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 - 0x30c], esi
cmp esi, ebx
je 0x11028b76
push esi
call sym.DuiLib_ext.dll_public:_static_struct_HINSTANCE______cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x304], eax
push esi
cmp eax, ebx
jne 0x11028b34
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x11028b76
call sym.DuiLib_ext.dll_public:_static_struct_HINSTANCE______cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, ebx
je 0x11028b76
push esi
call fcn.1104300a
pop ecx
push esi
push dword [ebp - 0x304]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push dword [ebp - 0x30c]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp edi, ebx
jne 0x11028bf5
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 - 0x300], eax
cmp eax, 0xffffffff
je 0x11028bee
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x11028bee
push esi
mov dword [ebp - 0x30c], ebx
call fcn.1104300a
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x30c]
push eax
push esi
push edi
push dword [ebp - 0x300]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x300]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x30c], esi
je 0x11028bea
push edi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
pop ecx
xor edi, edi
cmp edi, ebx
jne 0x11028bf5
xor eax, eax
jmp 0x11028e06
push 4
lea eax, [ebp - 0x318]
push eax
lea eax, [ebp - 0x308]
push eax
lea eax, [ebp - 0x310]
push eax
push esi
push edi
call fcn.110109fb
push edi
mov dword [ebp - 0x300], eax
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
add esp, 0x1c
cmp dword [ebp - 0x300], ebx
je 0x11028bee
push 0x2c
lea eax, [ebp - 0x3c]
push ebx
push eax
call sub.MSVCR100.dll_memset
mov eax, dword [ebp - 0x310]
mov ecx, dword [ebp - 0x308]
mov dword [ebp - 0x38], eax
imul eax, dword [ebp - 0x308]
add esp, 0xc
neg ecx
mov dword [ebp - 0x34], ecx
push 0x20
xor ecx, ecx
inc ecx
mov word [ebp - 0x30], cx
pop ecx
push ebx
shl eax, 2
push ebx
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2fc]
push eax
push ebx
lea eax, [ebp - 0x3c]
push eax
push ebx
mov dword [ebp - 0x3c], 0x28
mov word [ebp - 0x2e], cx
mov dword [ebp - 0x2c], ebx
mov byte [ebp - 0x2f1], bl
mov dword [ebp - 0x2fc], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x314], eax
cmp eax, ebx
je 0x11028bee
mov eax, dword [ebp - 0x310]
imul eax, dword [ebp - 0x308]
mov dword [ebp - 0x2f8], ebx
test eax, eax
jle 0x11028dad
mov ecx, dword [ebp - 0x2f8]
mov eax, dword [ebp - 0x300]
mov edx, dword [ebp - 0x2fc]
lea esi, [eax + ecx*4 + 3]
mov al, byte [esi]
mov byte [edx + ecx*4 + 3], al
mov eax, dword [ebp - 0x2fc]
lea edi, [eax + ecx*4]
cmp byte [edi + 3], 0xff
mov dword [ebp - 0x304], edi
jae 0x11028d39
movzx edx, byte [esi]
movzx eax, byte [esi - 1]
imul eax, edx
xor edx, edx
mov edi, 0xff
div edi
mov edx, dword [ebp - 0x304]
mov byte [ebp - 0x2f1], 1
mov byte [edx], al
movzx edx, byte [esi]
movzx eax, byte [esi - 2]
imul eax, edx
xor edx, edx
div edi
mov edx, dword [ebp - 0x2fc]
mov byte [edx + ecx*4 + 1], al
movzx edx, byte [esi]
movzx eax, byte [esi - 3]
imul eax, edx
xor edx, edx
mov esi, edi
div esi
jmp 0x11028d4e
mov al, byte [esi - 1]
mov byte [edi], al
mov al, byte [esi - 2]
mov edx, dword [ebp - 0x2fc]
mov byte [edx + ecx*4 + 1], al
mov al, byte [esi - 3]
mov edx, dword [ebp - 0x2fc]
mov byte [edx + ecx*4 + 2], al
mov eax, dword [ebp - 0x2fc]
mov edx, dword [eax + ecx*4]
cmp edx, dword [ebp + 0x10]
jne 0x11028d8e
mov byte [eax + ecx*4], bl
mov eax, dword [ebp - 0x2fc]
mov byte [eax + ecx*4 + 1], bl
mov eax, dword [ebp - 0x2fc]
mov byte [eax + ecx*4 + 2], bl
mov eax, dword [ebp - 0x2fc]
mov byte [eax + ecx*4 + 3], bl
mov byte [ebp - 0x2f1], 1
mov eax, dword [ebp - 0x310]
imul eax, dword [ebp - 0x308]
inc dword [ebp - 0x2f8]
cmp dword [ebp - 0x2f8], eax
jl 0x11028cbc
push dword [ebp - 0x300]
call fcn.11008d46
push 0x98
call fcn.11043382
pop ecx
mov esi, eax
pop ecx
mov dword [ebp - 0x304], esi
mov dword [ebp - 4], 1
cmp esi, ebx
je 0x11028de1
lea ecx, [esi + 0x10]
call sym.DuiLib_ext.dll_public:_void___thiscall_DuiLib::CDuiString::constructor_void_
mov ebx, esi
mov eax, dword [ebp - 0x314]
mov dword [ebx], eax
mov eax, dword [ebp - 0x310]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x308]
mov dword [ebx + 8], eax
mov al, byte [ebp - 0x2f1]
mov byte [ebx + 0xc], al
mov eax, ebx
call fcn.110432e3
ret