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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b8fd9
mov eax, dword fs:[0]
push eax
sub esp, 0x370
mov eax, dword [0x4f44d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2f8], 0
mov dword [ebp - 0x2fc], 0
cmp dword [ebp + 0xc], 0
jne 0x46a889
call sym.Unstall_App.exe_public:_static_class_DuiLib::CDuiString_const____cdecl_DuiLib::CPaintManagerUI::GetResourcePath_void_
push eax
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_public:_void___thiscall_DuiLib::CDuiString::constructor_class_DuiLib::CDuiString_const__
mov dword [ebp - 4], 0
call sym.Unstall_App.exe_public:_static_class_DuiLib::CDuiString_const____cdecl_DuiLib::CPaintManagerUI::GetResourceZip_void_
mov ecx, eax
call sym.Unstall_App.exe_public:_bool___thiscall_DuiLib::CDuiString::IsEmpty_void_const
movzx eax, al
test eax, eax
je 0x46a6c2
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_public:_class_DuiLib::CDuiString_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_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 - 0x32c], eax
cmp dword [ebp - 0x32c], 0xffffffff
jne 0x46a5e2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x46a984
push 0
mov edx, dword [ebp - 0x32c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x2fc], eax
cmp dword [ebp - 0x2fc], 0
jne 0x46a617
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x46a984
mov dword [ebp - 0x348], 0
mov eax, dword [ebp - 0x2fc]
push eax
call fcn.00485d4e
add esp, 4
mov dword [ebp - 0x36c], eax
mov ecx, dword [ebp - 0x36c]
mov dword [ebp - 0x2f8], ecx
push 0
lea edx, [ebp - 0x348]
push edx
mov eax, dword [ebp - 0x2fc]
push eax
mov ecx, dword [ebp - 0x2f8]
push ecx
mov edx, dword [ebp - 0x32c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x32c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x348]
cmp ecx, dword [ebp - 0x2fc]
je 0x46a6bd
mov edx, dword [ebp - 0x2f8]
mov dword [ebp - 0x370], edx
mov eax, dword [ebp - 0x370]
push eax
call fcn.00487fed
add esp, 4
mov dword [ebp - 0x2f8], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x46a984
jmp 0x46a872
call sym.Unstall_App.exe_public:_static_class_DuiLib::CDuiString_const____cdecl_DuiLib::CPaintManagerUI::GetResourceZip_void_
push eax
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_public:_class_DuiLib::CDuiString_const____thiscall_DuiLib::CDuiString::operator_class_DuiLib::CDuiString_const__
mov dword [ebp - 0x314], 0
call sym.Unstall_App.exe_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
movzx ecx, al
test ecx, ecx
je 0x46a6f6
call sym.Unstall_App.exe_public:_static_void____cdecl_DuiLib::CPaintManagerUI::GetResourceZipHandle_void_
mov dword [ebp - 0x314], eax
jmp 0x46a714
push 2
push 0
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call fcn.0046c330
add esp, 0xc
mov dword [ebp - 0x314], eax
cmp dword [ebp - 0x314], 0
jne 0x46a734
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x46a984
lea edx, [ebp - 0x2f0]
push edx
lea eax, [ebp - 0x374]
push eax
push 1
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x314]
push edx
call fcn.0046b810
add esp, 0x14
test eax, eax
je 0x46a772
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x46a984
mov eax, dword [ebp - 0xc4]
mov dword [ebp - 0x2fc], eax
cmp dword [ebp - 0x2fc], 0
jne 0x46a79e
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x46a984
mov ecx, dword [ebp - 0x2fc]
push ecx
call fcn.00485d4e
add esp, 4
mov dword [ebp - 0x378], eax
mov edx, dword [ebp - 0x378]
mov dword [ebp - 0x2f8], edx
push 3
mov eax, dword [ebp - 0x2fc]
push eax
mov ecx, dword [ebp - 0x2f8]
push ecx
mov edx, dword [ebp - 0x374]
push edx
mov eax, dword [ebp - 0x314]
push eax
call fcn.0046c990
add esp, 0x14
mov dword [ebp - 0x340], eax
cmp dword [ebp - 0x340], 0
je 0x46a857
cmp dword [ebp - 0x340], 0x600
je 0x46a857
mov ecx, dword [ebp - 0x2f8]
mov dword [ebp - 0x368], ecx
mov edx, dword [ebp - 0x368]
push edx
call fcn.00487fed
add esp, 4
mov dword [ebp - 0x2f8], 0
call sym.Unstall_App.exe_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
movzx eax, al
test eax, eax
jne 0x46a840
mov ecx, dword [ebp - 0x314]
push ecx
call fcn.0046b550
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x46a984
call sym.Unstall_App.exe_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
movzx edx, al
test edx, edx
jne 0x46a872
mov eax, dword [ebp - 0x314]
push eax
call fcn.0046b550
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call sym.Unstall_App.exe_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x46a97c
push str.COLOR
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00488cd2
add esp, 8
test eax, eax
jne 0x46a8ad
mov dword [ebp - 0x2f8], 1
jmp 0x46a97c
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call sym.Unstall_App.exe_public:_static_struct_HINSTANCE______cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x318], eax
cmp dword [ebp - 0x318], 0
jne 0x46a8d5
jmp 0x46a984
mov ecx, dword [ebp - 0x318]
push ecx
call sym.Unstall_App.exe_public:_static_struct_HINSTANCE______cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x334], eax
cmp dword [ebp - 0x334], 0
jne 0x46a906
mov edx, dword [ebp - 0x318]
push edx
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x46a984
mov eax, dword [ebp - 0x318]
push eax
call sym.Unstall_App.exe_public:_static_struct_HINSTANCE______cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x2fc], eax
cmp dword [ebp - 0x2fc], 0
jne 0x46a92a
jmp 0x46a984
mov ecx, dword [ebp - 0x2fc]
push ecx
call fcn.00485d4e
add esp, 4
mov dword [ebp - 0x358], eax
mov edx, dword [ebp - 0x358]
mov dword [ebp - 0x2f8], edx
mov eax, dword [ebp - 0x2fc]
push eax
mov ecx, dword [ebp - 0x334]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
mov edx, dword [ebp - 0x2f8]
push edx
call fcn.004872b0
add esp, 0xc
mov eax, dword [ebp - 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
xor ecx, ecx
jne 0x46a550
cmp dword [ebp - 0x2f8], 0
jne 0x46aa7a
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x324], eax
cmp dword [ebp - 0x324], 0xffffffff
jne 0x46a9c1
jmp 0x46aa7a
push 0
mov eax, dword [ebp - 0x324]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x2fc], eax
cmp dword [ebp - 0x2fc], 0
jne 0x46a9e4
jmp 0x46aa7a
mov dword [ebp - 0x33c], 0
mov ecx, dword [ebp - 0x2fc]
push ecx
call fcn.00485d4e
add esp, 4
mov dword [ebp - 0x34c], eax
mov edx, dword [ebp - 0x34c]
mov dword [ebp - 0x2f8], edx
push 0
lea eax, [ebp - 0x33c]
push eax
mov ecx, dword [ebp - 0x2fc]
push ecx
mov edx, dword [ebp - 0x2f8]
push edx
mov eax, dword [ebp - 0x324]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x324]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x33c]
cmp edx, dword [ebp - 0x2fc]
je 0x46aa73
mov eax, dword [ebp - 0x2f8]
mov dword [ebp - 0x360], eax
mov ecx, dword [ebp - 0x360]
push ecx
call fcn.00487fed
add esp, 4
mov dword [ebp - 0x2f8], 0
jmp 0x46aa7a
cmp dword [ebp - 0x2f8], 0
jne 0x46aa8a
xor eax, eax
jmp 0x46afc5
mov dword [ebp - 0x300], 0
mov dword [ebp - 0x320], 1
mov dword [ebp - 0x31c], 1
cmp dword [ebp + 0xc], 0
je 0x46aac3
push str.COLOR
mov edx, dword [ebp + 0xc]
push edx
call fcn.00488cd2
add esp, 8
test eax, eax
je 0x46ab21
push 4
lea eax, [ebp - 0x37c]
push eax
lea ecx, [ebp - 0x31c]
push ecx
lea edx, [ebp - 0x320]
push edx
mov eax, dword [ebp - 0x2fc]
push eax
mov ecx, dword [ebp - 0x2f8]
push ecx
call fcn.00485c30
add esp, 0x18
mov dword [ebp - 0x300], eax
mov edx, dword [ebp - 0x2f8]
mov dword [ebp - 0x364], edx
mov eax, dword [ebp - 0x364]
push eax
call fcn.00487fed
add esp, 4
cmp dword [ebp - 0x300], 0
jne 0x46ab21
xor eax, eax
jmp 0x46afc5
push 0x2c
push 0
lea ecx, [ebp - 0x3c]
push ecx
call fcn.004885e0
add esp, 0xc
mov dword [ebp - 0x3c], 0x28
mov edx, dword [ebp - 0x320]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x31c]
neg eax
mov dword [ebp - 0x34], eax
mov ecx, 1
mov word [ebp - 0x30], cx
mov edx, 0x20
mov word [ebp - 0x2e], dx
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x320]
imul eax, dword [ebp - 0x31c]
shl eax, 2
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x305], 0
mov dword [ebp - 0x304], 0
push 0
push 0
lea ecx, [ebp - 0x304]
push ecx
push 0
lea edx, [ebp - 0x3c]
push edx
push 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x344], eax
cmp dword [ebp - 0x344], 0
jne 0x46abb8
xor eax, eax
jmp 0x46afc5
mov byte [ebp - 0x310], 0
xor eax, eax
mov word [ebp - 0x30f], ax
mov byte [ebp - 0x30d], al
cmp dword [ebp + 0xc], 0
je 0x46acd9
push str.COLOR
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00488cd2
add esp, 8
test eax, eax
jne 0x46acd9
mov dword [ebp - 0x350], 0
mov edx, dword [ebp + 8]
mov dword [ebp - 0x328], edx
mov eax, dword [ebp - 0x328]
movzx ecx, word [eax]
cmp ecx, 0x23
jne 0x46ac25
mov edx, dword [ebp - 0x328]
push edx
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp - 0x328], eax
push 0x10
lea eax, [ebp - 0x350]
push eax
mov ecx, dword [ebp - 0x328]
push ecx
call fcn.00489dd3
add esp, 0xc
mov dword [ebp - 0x354], eax
lea edx, [ebp - 0x354]
mov dword [ebp - 0x300], edx
mov eax, 1
imul ecx, eax, 3
mov edx, 1
imul eax, edx, 3
mov edx, dword [ebp - 0x300]
mov cl, byte [edx + ecx]
mov byte [ebp + eax - 0x310], cl
mov edx, 1
imul eax, edx, 0
mov ecx, 1
shl ecx, 1
mov edx, dword [ebp - 0x300]
mov al, byte [edx + eax]
mov byte [ebp + ecx - 0x310], al
mov ecx, 1
shl ecx, 0
mov edx, 1
shl edx, 0
mov eax, dword [ebp - 0x300]
mov cl, byte [eax + ecx]
mov byte [ebp + edx - 0x310], cl
mov edx, 1
shl edx, 1
mov eax, 1
imul ecx, eax, 0
mov eax, dword [ebp - 0x300]
mov dl, byte [eax + edx]
mov byte [ebp + ecx - 0x310], dl
lea eax, [ebp - 0x310]
mov dword [ebp - 0x300], eax
mov dword [ebp - 0x2f4], 0
jmp 0x46acf4
mov ecx, dword [ebp - 0x2f4]
add ecx, 1
mov dword [ebp - 0x2f4], ecx
mov edx, dword [ebp - 0x320]
imul edx, dword [ebp - 0x31c]
cmp dword [ebp - 0x2f4], edx
jge 0x46aecc
mov eax, dword [ebp - 0x2f4]
mov ecx, dword [ebp - 0x304]
mov edx, dword [ebp - 0x2f4]
mov esi, dword [ebp - 0x300]
mov dl, byte [esi + edx*4 + 3]
mov byte [ecx + eax*4 + 3], dl
mov eax, dword [ebp - 0x2f4]
mov ecx, dword [ebp - 0x304]
movzx edx, byte [ecx + eax*4 + 3]
cmp edx, 0xff
jge 0x46ae0b
mov eax, dword [ebp - 0x2f4]
mov ecx, dword [ebp - 0x300]
movzx eax, byte [ecx + eax*4 + 2]
mov edx, dword [ebp - 0x2f4]
mov ecx, dword [ebp - 0x300]
movzx edx, byte [ecx + edx*4 + 3]
imul eax, edx
xor edx, edx
mov ecx, 0xff
div ecx
mov edx, dword [ebp - 0x2f4]
mov ecx, dword [ebp - 0x304]
mov byte [ecx + edx*4], al
mov edx, dword [ebp - 0x2f4]
mov eax, dword [ebp - 0x300]
movzx eax, byte [eax + edx*4 + 1]
mov ecx, dword [ebp - 0x2f4]
mov edx, dword [ebp - 0x300]
movzx ecx, byte [edx + ecx*4 + 3]
imul eax, ecx
xor edx, edx
mov ecx, 0xff
div ecx
mov edx, dword [ebp - 0x2f4]
mov ecx, dword [ebp - 0x304]
mov byte [ecx + edx*4 + 1], al
mov edx, dword [ebp - 0x2f4]
mov eax, dword [ebp - 0x300]
movzx eax, byte [eax + edx*4]
mov ecx, dword [ebp - 0x2f4]
mov edx, dword [ebp - 0x300]
movzx ecx, byte [edx + ecx*4 + 3]
imul eax, ecx
xor edx, edx
mov ecx, 0xff
div ecx
mov edx, dword [ebp - 0x2f4]
mov ecx, dword [ebp - 0x304]
mov byte [ecx + edx*4 + 2], al
mov byte [ebp - 0x305], 1
jmp 0x46ae69
mov edx, dword [ebp - 0x2f4]
mov eax, dword [ebp - 0x304]
mov ecx, dword [ebp - 0x2f4]
mov esi, dword [ebp - 0x300]
mov cl, byte [esi + ecx*4 + 2]
mov byte [eax + edx*4], cl
mov edx, dword [ebp - 0x2f4]
mov eax, dword [ebp - 0x304]
mov ecx, dword [ebp - 0x2f4]
mov esi, dword [ebp - 0x300]
mov cl, byte [esi + ecx*4 + 1]
mov byte [eax + edx*4 + 1], cl
mov edx, dword [ebp - 0x2f4]
mov eax, dword [ebp - 0x304]
mov ecx, dword [ebp - 0x2f4]
mov esi, dword [ebp - 0x300]
mov cl, byte [esi + ecx*4]
mov byte [eax + edx*4 + 2], cl
mov edx, dword [ebp - 0x2f4]
mov eax, dword [ebp - 0x304]
mov ecx, dword [eax + edx*4]
cmp ecx, dword [ebp + 0x10]
jne 0x46aec7
mov edx, dword [ebp - 0x2f4]
mov eax, dword [ebp - 0x304]
mov byte [eax + edx*4], 0
mov ecx, dword [ebp - 0x2f4]
mov edx, dword [ebp - 0x304]
mov byte [edx + ecx*4 + 1], 0
mov eax, dword [ebp - 0x2f4]
mov ecx, dword [ebp - 0x304]
mov byte [ecx + eax*4 + 2], 0
mov edx, dword [ebp - 0x2f4]
mov eax, dword [ebp - 0x304]
mov byte [eax + edx*4 + 3], 0
mov byte [ebp - 0x305], 1
jmp 0x46ace5
cmp dword [ebp + 0xc], 0
je 0x46aee7
push str.COLOR
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00488cd2
add esp, 8
test eax, eax
je 0x46aef6
mov edx, dword [ebp - 0x300]
push edx
call fcn.00485c10
add esp, 4
push 0xa0
call fcn.0048710f
add esp, 4
mov dword [ebp - 0x330], eax
mov dword [ebp - 4], 1
cmp dword [ebp - 0x330], 0
je 0x46af35
mov ecx, dword [ebp - 0x330]
add ecx, 0x18
call sym.Unstall_App.exe_public:_void___thiscall_DuiLib::CDuiString::constructor_void_
mov eax, dword [ebp - 0x330]
mov dword [ebp - 0x338], eax
jmp 0x46af3f
mov dword [ebp - 0x338], 0
mov ecx, dword [ebp - 0x338]
mov dword [ebp - 0x35c], ecx
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x35c]
mov dword [ebp - 0x30c], edx
mov eax, dword [ebp - 0x30c]
mov ecx, dword [ebp - 0x344]
mov dword [eax], ecx
mov edx, dword [ebp - 0x30c]
mov eax, dword [ebp - 0x304]
mov dword [edx + 4], eax
mov ecx, dword [ebp - 0x30c]
mov edx, dword [ebp - 0x320]
mov dword [ecx + 0xc], edx
mov eax, dword [ebp - 0x30c]
mov ecx, dword [ebp - 0x31c]
mov dword [eax + 0x10], ecx
mov edx, dword [ebp - 0x30c]
mov al, byte [ebp - 0x305]
mov byte [edx + 0x14], al
mov ecx, dword [ebp - 0x30c]
mov byte [ecx + 0x15], 0
mov edx, dword [ebp - 0x30c]
mov dword [edx + 8], 0
mov eax, dword [ebp - 0x30c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00487ff2
mov esp, ebp
pop ebp
ret