Function at 0x10012080
Capabilities:
Check if file exists
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10038d49
mov eax, dword fs:[0]
push eax
sub esp, 0x358
mov eax, dword [0x10063040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ecx, 0x1006ba40
mov dword [ebp - 0x360], esi
call fcn.10038b15
lea eax, [ebp - 0x9c]
push eax
call dword [sym.imp.QuiLib.dll_public:_static_class_DuiLib::CStdString___cdecl_DuiLib::CPaintManagerUI::GetResourcePath_void_]
add esp, 4
lea eax, [ebp - 0x124]
mov dword [ebp - 4], 0
push eax
call dword [sym.imp.QuiLib.dll_public:_static_class_DuiLib::CStdString___cdecl_DuiLib::CPaintManagerUI::GetResourceZip_void_]
add esp, 4
mov ecx, eax
mov byte [ebp - 4], 1
call dword [sym.imp.QuiLib.dll_public:_bool___thiscall_DuiLib::CStdString::IsEmpty_void_const]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x124]
mov edi, dword [sym.imp.QuiLib.dll_public:_void___thiscall_DuiLib::CStdString::destructor_void_]
mov bl, al
call edi
test bl, bl
je 0x100121eb
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [ebp - 0x9c]
push esi
test eax, eax
jne 0x1001212a
call dword [0x1004d674]
jmp 0x10012130
call dword [sym.imp.QuiLib.dll_public:_class_DuiLib::CStdString_const____thiscall_DuiLib::CStdString::operator_wchar_t_const__]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea ecx, [ebp - 0x9c]
call dword [sym.imp.QuiLib.dll_public:_wchar_t_const____thiscall_DuiLib::CStdString::GetData_void_]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x1001216c
lea ecx, [ebp - 0x9c]
mov dword [ebp - 4], eax
call edi
jmp 0x10012459
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
jne 0x1001218f
lea ecx, [ebp - 0x9c]
mov dword [ebp - 4], 0xffffffff
call edi
jmp 0x10012459
push esi
mov dword [ebp - 0x358], 0
call fcn.10037897
add esp, 4
mov edi, eax
lea eax, [ebp - 0x358]
push 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x358], esi
je 0x10012441
push edi
call fcn.10037892
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x9c]
mov eax, dword [sym.imp.QuiLib.dll_public:_void___thiscall_DuiLib::CStdString::destructor_void_]
call eax
jmp 0x10012459
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.QuiLib.dll_public:_static_class_DuiLib::CStdString___cdecl_DuiLib::CPaintManagerUI::GetResourceZip_void_]
add esp, 4
push eax
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 2
call dword [0x1004d690]
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 0
call edi
call dword [sym.imp.QuiLib.dll_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_]
test al, al
je 0x1001222f
call dword [sym.imp.QuiLib.dll_public:_static_void____cdecl_DuiLib::CPaintManagerUI::GetResourceZipHandle_void_]
mov ebx, eax
jmp 0x10012365
lea ecx, [ebp - 0x9c]
call dword [sym.imp.QuiLib.dll_public:_wchar_t_const____thiscall_DuiLib::CStdString::GetData_void_]
push 0x340
mov ebx, eax
call fcn.10037862
mov esi, eax
add esp, 4
mov dword [ebp - 0x358], esi
lea edi, [esi + 0x138]
mov dword [esi], 0
push edi
push 0x104
mov dword [esi + 4], 0xffffffff
mov dword [esi + 0x134], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
add edi, 0xfffffffe
nop
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x10012280
mov eax, dword [0x10050334]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push ebx
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x35c], eax
cmp eax, 0xffffffff
jne 0x100122be
mov eax, 0x200
jmp 0x10012329
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov esi, eax
cmp esi, 1
push 0x1c
sete bl
call fcn.10037862
mov edi, eax
add esp, 4
mov eax, dword [ebp - 0x35c]
mov byte [edi], 1
mov byte [edi + 1], bl
mov dword [edi + 4], eax
mov byte [edi + 8], 0
mov dword [edi + 0xc], 0
cmp esi, 1
jne 0x10012307
push esi
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [edi + 0xc], eax
xor eax, eax
test edi, edi
jne 0x10012315
mov esi, dword [ebp - 0x358]
jmp 0x10012329
mov ecx, edi
call fcn.10016230
mov esi, dword [ebp - 0x358]
mov dword [esi], eax
mov eax, dword [0x1006a228]
mov dword [0x1006610c], eax
test eax, eax
je 0x10012344
push 0x340
push esi
call fcn.1003739d
add esp, 8
xor ebx, ebx
jmp 0x10012359
push 8
call fcn.10037862
mov ebx, eax
add esp, 4
mov dword [ebx], 1
mov dword [ebx + 4], esi
mov edi, dword [sym.imp.QuiLib.dll_public:_void___thiscall_DuiLib::CStdString::destructor_void_]
mov esi, dword [ebp - 0x360]
test ebx, ebx
jne 0x1001237d
lea ecx, [ebp - 0x9c]
mov dword [ebp - 4], 0xffffffff
call edi
jmp 0x10012459
lea eax, [ebp - 0x354]
mov edx, esi
push eax
lea eax, [ebp - 0x358]
push eax
push ecx
mov ecx, ebx
call fcn.100181e0
add esp, 0xc
test eax, eax
je 0x100123b0
lea ecx, [ebp - 0x9c]
mov dword [ebp - 4], 0xffffffff
call edi
jmp 0x10012459
mov esi, dword [ebp - 0x128]
test esi, esi
jne 0x100123ce
lea ecx, [ebp - 0x9c]
mov dword [ebp - 4], 0xffffffff
call edi
jmp 0x10012459
push esi
call fcn.10037897
add esp, 4
mov edi, eax
cmp dword [ebx], 1
je 0x100123ea
mov dword [0x1006610c], 0x80000
jmp 0x1001240b
push ecx
mov ecx, dword [ebx + 4]
push esi
push edi
push dword [ebp - 0x358]
call fcn.10017e00
mov dword [0x1006610c], eax
test eax, eax
je 0x1001242f
cmp eax, 0x600
je 0x1001242f
push edi
call fcn.10037892
mov eax, dword [sym.imp.QuiLib.dll_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_]
add esp, 4
call eax
test al, al
jne 0x100121d2
mov ecx, ebx
call fcn.10018470
jmp 0x100121d2
mov eax, dword [sym.imp.QuiLib.dll_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_]
call eax
test al, al
jne 0x10012441
mov ecx, ebx
call fcn.10018470
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x9c]
mov eax, dword [sym.imp.QuiLib.dll_public:_void___thiscall_DuiLib::CStdString::destructor_void_]
call eax
test edi, edi
jne 0x100124d3
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp - 0x360]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x100124cc
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x100124cc
push esi
mov dword [ebp - 0x360], 0
call fcn.10037897
add esp, 4
mov edi, eax
lea eax, [ebp - 0x360]
push 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x360], esi
je 0x100124d3
push edi
call fcn.10037892
add esp, 4
xor eax, eax
jmp 0x10012576
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x10012569
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push esi
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [ebp - 0x35c], 0
lea eax, [ebp - 0x35c]
push eax
push 1
push ebx
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov eax, dword [ebp - 0x35c]
push 0x10
mov dword [ebp - 0x364], eax
call dword [sym.imp.gdiplus.dll_GdipAlloc]
mov esi, eax
test esi, esi
je 0x10012556
lea eax, [esi + 4]
mov dword [esi], vtable.Gdiplus::Image.0
push eax
push dword [ebp - 0x364]
mov dword [eax], 0
call dword [sym.imp.gdiplus.dll_GdipLoadImageFromStream]
mov dword [esi + 8], eax
mov dword [esi + 8], 0
test eax, eax
je 0x1001256b
mov eax, dword [ebp - 0x35c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
xor esi, esi
push edi
call fcn.10037892
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1003738f
mov esp, ebp
pop ebp
ret 4