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

Disassembly:
push 0x318
mov eax, 0x5b98f1
call fcn.005a73e9
mov edi, dword [ebp + 0xc]
xor ebx, ebx
xor esi, esi
mov dword [ebp - 0x308], edi
cmp edi, ebx
jne 0x5814df
call sym.GameDemo_u.exe_public:_static_class_DuiLib::CDuiString_const____cdecl_DuiLib::CPaintManagerUI::GetResourcePath_void_
push eax
lea ecx, [ebp - 0xc0]
call sym.GameDemo_u.exe_public:_void___thiscall_DuiLib::CDuiString::constructor_class_DuiLib::CDuiString_const__
mov dword [ebp - 4], ebx
call sym.GameDemo_u.exe_public:_static_class_DuiLib::CDuiString_const____cdecl_DuiLib::CPaintManagerUI::GetResourceZip_void_
mov ecx, eax
call sym.GameDemo_u.exe_public:_bool___thiscall_DuiLib::CDuiString::IsEmpty_void_const
test al, al
je 0x5813ea
push dword [ebp + 8]
lea ecx, [ebp - 0xc0]
call sym.GameDemo_u.exe_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.GameDemo_u.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x300], edi
cmp edi, 0xffffffff
jne 0x58138d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call sym.GameDemo_u.exe_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x581786
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
jne 0x5813a4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x581379
push esi
mov dword [ebp - 0x31c], ebx
call fcn.005a6cca
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x31c]
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 - 0x31c], esi
je 0x5814cb
push edi
call fcn.005a8607
pop ecx
jmp 0x581379
call sym.GameDemo_u.exe_public:_static_class_DuiLib::CDuiString_const____cdecl_DuiLib::CPaintManagerUI::GetResourceZip_void_
push eax
lea ecx, [ebp - 0xc0]
call sym.GameDemo_u.exe_public:_class_DuiLib::CDuiString_const____thiscall_DuiLib::CDuiString::operator_class_DuiLib::CDuiString_const__
call sym.GameDemo_u.exe_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
test al, al
je 0x58140b
call sym.GameDemo_u.exe_public:_static_void____cdecl_DuiLib::CPaintManagerUI::GetResourceZipHandle_void_
jmp 0x581422
push 2
push ebx
lea ecx, [ebp - 0xc0]
call sym.GameDemo_u.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call fcn.0059c2a2
add esp, 0xc
mov dword [ebp - 0x2f8], eax
cmp eax, ebx
je 0x581379
lea eax, [ebp - 0x2f0]
push eax
lea eax, [ebp - 0x310]
push eax
push 1
push dword [ebp + 8]
push dword [ebp - 0x2f8]
call fcn.0059a9ba
add esp, 0x14
test eax, eax
jne 0x581379
mov esi, dword [ebp - 0xc4]
cmp esi, ebx
je 0x581379
push esi
call fcn.005a6cca
push 3
push esi
mov edi, eax
push edi
push dword [ebp - 0x310]
push dword [ebp - 0x2f8]
call fcn.0059c300
add esp, 0x18
cmp eax, ebx
je 0x5814b6
cmp eax, 0x600
je 0x5814b6
push edi
call fcn.005a8607
pop ecx
call sym.GameDemo_u.exe_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
test al, al
jne 0x581379
push dword [ebp - 0x2f8]
call fcn.0059c338
jmp 0x5813e7
call sym.GameDemo_u.exe_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
test al, al
jne 0x5814cb
push dword [ebp - 0x2f8]
call fcn.0059c338
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call sym.GameDemo_u.exe_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
jmp 0x58177e
push str.COLOR
push edi
call fcn.005a7442
pop ecx
pop ecx
test eax, eax
jne 0x581704
xor edi, edi
inc edi
xor eax, eax
inc eax
mov dword [ebp - 0x2f8], ebx
mov dword [ebp - 0x318], eax
mov dword [ebp - 0x314], eax
cmp dword [ebp - 0x308], ebx
je 0x58152a
push str.COLOR
push dword [ebp - 0x308]
call fcn.005a7442
pop ecx
pop ecx
test eax, eax
je 0x581563
push 4
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x314]
push eax
lea eax, [ebp - 0x318]
push eax
push esi
push edi
call fcn.005a54b0
push edi
mov dword [ebp - 0x2f8], eax
call fcn.005a8607
add esp, 0x1c
cmp dword [ebp - 0x2f8], ebx
je 0x58180d
push 0x2c
lea eax, [ebp - 0x3c]
push ebx
push eax
call fcn.005a7500
mov eax, dword [ebp - 0x314]
mov ecx, dword [ebp - 0x318]
mov edx, eax
imul eax, ecx
add esp, 0xc
neg edx
mov dword [ebp - 0x34], edx
push 0x20
xor edx, edx
inc edx
mov word [ebp - 0x30], dx
pop edx
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 dword [ebp - 0x38], ecx
mov word [ebp - 0x2e], dx
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 - 0x31c], eax
cmp eax, ebx
je 0x58180d
xor eax, eax
mov byte [ebp - 0x30c], bl
lea edi, [ebp - 0x30b]
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp dword [ebp - 0x308], ebx
je 0x581665
push str.COLOR
push dword [ebp - 0x308]
call fcn.005a7442
pop ecx
pop ecx
test eax, eax
jne 0x581665
mov eax, dword [ebp + 8]
mov dword [ebp - 0x320], ebx
cmp word [eax], 0x23
jne 0x58161d
push eax
call dword [sym.imp.USER32.dll_CharNextW]
push 0x10
lea ecx, [ebp - 0x320]
push ecx
push eax
call fcn.005a85ed
mov dword [ebp - 0x304], eax
mov cl, byte [ebp - 0x301]
mov byte [ebp - 0x30a], al
mov al, byte [ebp - 0x302]
mov byte [ebp - 0x30b], ah
mov byte [ebp - 0x30c], al
lea eax, [ebp - 0x30c]
add esp, 0xc
mov byte [ebp - 0x309], cl
mov dword [ebp - 0x2f8], eax
mov eax, dword [ebp - 0x314]
imul eax, dword [ebp - 0x318]
mov dword [ebp - 0x300], ebx
test eax, eax
jle 0x581888
mov ecx, dword [ebp - 0x300]
mov eax, dword [ebp - 0x2f8]
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 - 0x310], edi
jae 0x581814
movzx edx, byte [esi]
movzx eax, byte [esi - 1]
imul eax, edx
xor edx, edx
mov edi, 0xff
div edi
mov edx, dword [ebp - 0x310]
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 0x581829
push edi
push dword [ebp + 8]
call sym.GameDemo_u.exe_public:_static_struct_HINSTANCE______cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [ebp - 0x304], esi
cmp esi, ebx
je 0x581786
push esi
call sym.GameDemo_u.exe_public:_static_struct_HINSTANCE______cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x310], eax
push esi
cmp eax, ebx
jne 0x581740
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x581786
call sym.GameDemo_u.exe_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 0x581786
push esi
call fcn.005a6cca
pop ecx
push esi
push dword [ebp - 0x310]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.005a8620
add esp, 0xc
push dword [ebp - 0x304]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp edi, ebx
jne 0x5814f7
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x300], edi
cmp edi, 0xffffffff
je 0x58180d
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
jne 0x5817c3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x58180d
push esi
mov dword [ebp - 0x304], ebx
call fcn.005a6cca
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x304]
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 - 0x304], esi
je 0x581805
push edi
call fcn.005a8607
pop ecx
xor edi, edi
cmp edi, ebx
jne 0x5814f7
xor eax, eax
jmp 0x581910
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 0x581869
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 - 0x314]
imul eax, dword [ebp - 0x318]
inc dword [ebp - 0x300]
cmp dword [ebp - 0x300], eax
jl 0x581680
cmp dword [ebp - 0x308], ebx
je 0x5818a6
push str.COLOR
push dword [ebp - 0x308]
call fcn.005a7442
pop ecx
pop ecx
test eax, eax
je 0x5818b2
push dword [ebp - 0x2f8]
call fcn.0059c406
pop ecx
push 0xa0
call fcn.005a757a
mov esi, eax
pop ecx
mov dword [ebp - 0x320], esi
mov dword [ebp - 4], 1
cmp esi, ebx
je 0x5818dc
lea ecx, [esi + 0x18]
call sym.GameDemo_u.exe_public:_void___thiscall_DuiLib::CDuiString::constructor_void_
mov eax, esi
jmp 0x5818de
xor eax, eax
mov ecx, dword [ebp - 0x31c]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x2fc]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x318]
mov dword [eax + 0xc], ecx
mov ecx, dword [ebp - 0x314]
mov dword [eax + 0x10], ecx
mov cl, byte [ebp - 0x2f1]
mov byte [eax + 0x14], cl
mov byte [eax + 0x15], bl
mov dword [eax + 8], ebx
call fcn.005a7433
ret