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

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x370
mov qword [rsp + 0x98], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x1800f18c0]
xor rax, rsp
mov qword [rsp + 0x360], rax
mov r15d, r8d
mov rbp, rdx
mov r12, rcx
xor r14d, r14d
mov edi, r14d
lea r13d, [r14 + 3]
cmp rdx, r14
je 0x18004eb9d
lea rcx, str.HICON
call fcn.18008f7f0
cmp eax, r14d
jne 0x18004eaea
or r8d, 0xffffffff
mov rdx, r12
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::constructor_wchar_t_const____ptr64__int____ptr64
nop
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_int___cdecl_DuiLib::CDuiString::GetLength_void_const___ptr64
cmp eax, r14d
jle 0x18004ead2
xor edx, edx
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_wchar_t___cdecl_DuiLib::CDuiString::operator___int_const___ptr64
cmp ax, 0x7c
jne 0x18004ead2
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_wchar_t_const____ptr64___cdecl_DuiLib::CDuiString::operator_wchar_t_const____ptr64_void_const___ptr64
xor edx, edx
lea r8d, [r14 + 0xa]
lea rcx, [rax + 2]
call fcn.18008fbe0
mov edi, eax
cmp rdi, r14
je 0x18004ead2
mov ecx, 0xb8
call fcn.1800878a0
mov rbx, rax
mov qword [rsp + 0x58], rax
cmp rax, r14
je 0x18004eaaf
lea rcx, [rax + 0x28]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::constructor_void____ptr64
jmp 0x18004eab2
mov rbx, r14
lea r8, [rbx + 0x1c]
lea rdx, [rbx + 0x18]
mov rcx, rdi
call fcn.1800481cc
mov qword [rbx], rax
mov byte [rbx + 0x20], 1
mov dword [rbx + 0xb0], r15d
jmp 0x18004ead5
mov rbx, r14
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::destructor_void____ptr64
mov rax, rbx
jmp 0x18004f148
lea rdx, str.COLOR
mov rcx, rbp
call fcn.18008f7f0
cmp eax, r14d
jne 0x18004eb08
mov esi, 1
jmp 0x18004ee70
call sym.VKD.dll_public:_static_struct_HINSTANCE______ptr64___cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
mov rcx, rax
mov r8, rbp
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r13, rax
cmp rax, r14
je 0x18004eddc
call sym.VKD.dll_public:_static_struct_HINSTANCE______ptr64___cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
mov rcx, rax
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r14, rax
test rax, rax
jne 0x18004eb4f
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x18004eddc
call sym.VKD.dll_public:_static_struct_HINSTANCE______ptr64___cdecl_DuiLib::CPaintManagerUI::GetResourceDll_void_
mov rcx, rax
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test eax, eax
je 0x18004edd9
mov rcx, rdi
call fcn.18002d8d0
mov rsi, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rax
mov r8, rdi
mov rcx, rsi
call fcn.1800898c0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FreeResource]
xor r14d, r14d
jmp 0x18004edce
call sym.VKD.dll_public:_static_class_DuiLib::CDuiString_const____ptr64___cdecl_DuiLib::CPaintManagerUI::GetResourcePath_void_
mov rdx, rax
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::constructor_class_DuiLib::CDuiString_const____ptr64____ptr64
nop
call sym.VKD.dll_public:_static_class_DuiLib::CDuiString_const____ptr64___cdecl_DuiLib::CPaintManagerUI::GetResourceZip_void_
mov rcx, rax
call sym.VKD.dll_public:_bool___cdecl_DuiLib::CDuiString::IsEmpty_void_const___ptr64
cmp al, r14b
je 0x18004eca3
mov rdx, r12
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_class_DuiLib::CDuiString_const____ptr64___cdecl_DuiLib::CDuiString::operator_wchar_t_const____ptr64____ptr64
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_wchar_t_const____ptr64___cdecl_DuiLib::CDuiString::operator_wchar_t_const____ptr64_void_const___ptr64
mov rcx, rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], r13d
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x18004ec28
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::destructor_void____ptr64
jmp 0x18004eddc
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, r14d
jne 0x18004ec4c
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::destructor_void____ptr64
jmp 0x18004eddc
mov dword [rsp + 0x44], r14d
mov rcx, rdi
call fcn.18002d8d0
mov rsi, rax
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x44]
mov r8d, edi
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x44], edi
je 0x18004edc1
mov rcx, rsi
call fcn.180088960
nop
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::destructor_void____ptr64
jmp 0x18004eddc
call sym.VKD.dll_public:_static_class_DuiLib::CDuiString_const____ptr64___cdecl_DuiLib::CPaintManagerUI::GetResourceZip_void_
mov rdx, rax
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_class_DuiLib::CDuiString_const____ptr64___cdecl_DuiLib::CDuiString::operator_class_DuiLib::CDuiString_const____ptr64____ptr64
call sym.VKD.dll_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
cmp al, r14b
je 0x18004eccc
call sym.VKD.dll_public:_static_void____ptr64___cdecl_DuiLib::CPaintManagerUI::GetResourceZipHandle_void_
mov rbx, rax
jmp 0x18004ecea
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_wchar_t_const____ptr64___cdecl_DuiLib::CDuiString::operator_wchar_t_const____ptr64_void_const___ptr64
mov rcx, rax
xor edx, edx
lea r8d, [rdx + 2]
call fcn.18007bc3c
mov rbx, rax
cmp rbx, r14
jne 0x18004ed01
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::destructor_void____ptr64
jmp 0x18004eddc
lea rax, [rsp + 0x130]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
mov r8b, 1
mov rdx, r12
mov rcx, rbx
call fcn.180079f38
cmp eax, r14d
je 0x18004ed38
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::destructor_void____ptr64
jmp 0x18004eddc
mov edi, dword [rsp + 0x35c]
cmp edi, r14d
jne 0x18004ed56
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::destructor_void____ptr64
jmp 0x18004eddc
mov rcx, rdi
call fcn.18002d8d0
mov rsi, rax
mov dword [rsp + 0x20], r13d
mov r9d, edi
mov r8, rax
mov edx, dword [rsp + 0x58]
mov rcx, rbx
call fcn.18007bcd0
cmp eax, r14d
je 0x18004edae
cmp eax, 0x600
je 0x18004edae
mov rcx, rsi
call fcn.180088960
call sym.VKD.dll_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
cmp al, r14b
jne 0x18004ed9f
mov rcx, rbx
call fcn.18007bd08
nop
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::destructor_void____ptr64
jmp 0x18004eddc
call sym.VKD.dll_public:_static_bool___cdecl_DuiLib::CPaintManagerUI::IsCachedResourceZip_void_
cmp al, r14b
jne 0x18004edc1
mov rcx, rbx
call fcn.18007bd08
nop
lea rcx, [rsp + 0xa0]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::destructor_void____ptr64
cmp rsi, r14
jne 0x18004ee70
jmp 0x18004eddc
xor r14d, r14d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x18004ee69
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, r14d
je 0x18004ee69
mov dword [rsp + 0x60], r14d
mov rcx, rdi
call fcn.18002d8d0
mov rsi, rax
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x60]
mov r8d, edi
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x60], edi
je 0x18004ee64
mov rcx, rsi
call fcn.180088960
mov rsi, r14
cmp rsi, r14
jne 0x18004ee70
xor eax, eax
jmp 0x18004f148
mov rbx, r14
mov dword [rsp + 0x54], 1
mov dword [rsp + 0x50], 1
cmp rbp, r14
je 0x18004ee9c
lea rdx, str.COLOR
mov rcx, rbp
call fcn.18008f7f0
cmp eax, r14d
je 0x18004eed9
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x64]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x54]
mov edx, edi
mov rcx, rsi
call fcn.1800857f4
mov rbx, rax
mov rcx, rsi
call fcn.180088960
cmp rbx, r14
jne 0x18004eed9
xor eax, eax
jmp 0x18004f148
xor edx, edx
lea r8d, [rdx + 0x2c]
lea rcx, [rsp + 0x68]
call fcn.18008fd00
mov dword [rsp + 0x68], 0x28
mov ecx, dword [rsp + 0x54]
mov dword [rsp + 0x6c], ecx
mov edx, dword [rsp + 0x50]
mov eax, edx
neg eax
mov dword [rsp + 0x70], eax
mov word [rsp + 0x74], 1
mov word [rsp + 0x76], 0x20
mov dword [rsp + 0x78], r14d
imul edx, ecx
shl edx, 2
mov dword [rsp + 0x7c], edx
mov dil, r14b
mov qword [rsp + 0x48], r14
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x48]
xor r8d, r8d
lea rdx, [rsp + 0x68]
xor ecx, ecx
call qword [sym.imp.GDI32.dll_CreateDIBSection]
mov rsi, rax
cmp rax, r14
jne 0x18004ef58
xor eax, eax
jmp 0x18004f148
mov byte [rsp + 0x40], r14b
xor eax, eax
mov word [rsp + 0x41], ax
mov byte [rsp + 0x43], al
cmp rbp, r14
je 0x18004efd2
lea rdx, str.COLOR
mov rcx, rbp
call fcn.18008f7f0
cmp eax, r14d
jne 0x18004efd2
mov qword [rsp + 0x58], r14
cmp word [r12], 0x23
jne 0x18004ef9a
mov rcx, r12
call qword [sym.imp.USER32.dll_CharNextW]
mov r12, rax
mov r8d, InitCommonControls
lea rdx, [rsp + 0x58]
mov rcx, r12
call fcn.18008fbe0
mov dword [rsp + 0x44], eax
mov cl, byte [rsp + 0x47]
mov byte [rsp + 0x43], cl
mov byte [rsp + 0x42], al
mov al, byte [rsp + 0x45]
mov byte [rsp + 0x41], al
mov al, byte [rsp + 0x46]
mov byte [rsp + 0x40], al
lea rbx, [rsp + 0x40]
mov r10d, r14d
mov eax, dword [rsp + 0x50]
imul eax, dword [rsp + 0x54]
cmp eax, r14d
jle 0x18004f0d9
mov r8, r14
lea r9, [rbx + 3]
mov r12d, 0x80808081
mov cl, byte [r9]
mov rax, qword [rsp + 0x48]
mov byte [rax + r8 + 3], cl
mov r11, qword [rsp + 0x48]
cmp byte [r11 + r8 + 3], 0xff
jae 0x18004f067
movzx ecx, byte [r9 - 1]
movzx eax, byte [r9]
imul ecx, eax
mov eax, r12d
mul ecx
shr edx, 7
mov byte [r11 + r8], dl
movzx ecx, byte [r9 - 2]
movzx eax, byte [r9]
imul ecx, eax
mov eax, r12d
mul ecx
shr edx, 7
mov rax, qword [rsp + 0x48]
mov byte [rax + r8 + 1], dl
movzx ecx, byte [r9 - 3]
movzx eax, byte [r9]
imul ecx, eax
mov eax, r12d
mul ecx
shr edx, 7
mov rax, qword [rsp + 0x48]
mov byte [rax + r8 + 2], dl
mov dil, 1
jmp 0x18004f08b
mov al, byte [r9 - 1]
mov byte [r11 + r8], al
mov cl, byte [r9 - 2]
mov rax, qword [rsp + 0x48]
mov byte [rax + r8 + 1], cl
mov cl, byte [r9 - 3]
mov rax, qword [rsp + 0x48]
mov byte [rax + r8 + 2], cl
mov rax, qword [rsp + 0x48]
cmp dword [rax + r8], r15d
jne 0x18004f0bb
mov byte [rax + r8], r14b
mov rax, qword [rsp + 0x48]
mov byte [rax + r8 + 1], r14b
mov rax, qword [rsp + 0x48]
mov byte [rax + r8 + 2], r14b
mov rax, qword [rsp + 0x48]
mov byte [rax + r8 + 3], r14b
mov dil, 1
add r10d, 1
add r8, 4
add r9, 4
mov eax, dword [rsp + 0x50]
imul eax, dword [rsp + 0x54]
cmp r10d, eax
jl 0x18004eff4
cmp rbp, r14
je 0x18004f0f2
lea rdx, str.COLOR
mov rcx, rbp
call fcn.18008f7f0
cmp eax, r14d
je 0x18004f0fa
mov rcx, rbx
call fcn.18007bdb4
mov ecx, 0xb8
call fcn.1800878a0
mov rbx, rax
mov qword [rsp + 0x58], rax
cmp rax, r14
je 0x18004f11c
lea rcx, [rax + 0x28]
call sym.VKD.dll_public:_void___cdecl_DuiLib::CDuiString::constructor_void____ptr64
jmp 0x18004f11f
mov rbx, r14
mov qword [rbx], rsi
mov rcx, qword [rsp + 0x48]
mov qword [rbx + 8], rcx
mov ecx, dword [rsp + 0x54]
mov dword [rbx + 0x18], ecx
mov ecx, dword [rsp + 0x50]
mov dword [rbx + 0x1c], ecx
mov byte [rbx + 0x20], dil
mov byte [rbx + 0x21], r14b
mov qword [rbx + 0x10], r14
mov rax, rbx
mov rcx, qword [rsp + 0x360]
xor rcx, rsp
call fcn.180087cc0
lea r11, [rsp + 0x370]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret