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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10292bbb
mov eax, dword fs:[0]
push eax
sub esp, 0x3d8
mov eax, dword [0x1035dd3c]
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 ebx, dword [ebp + 0xc]
xor esi, esi
mov dword [ebp - 0x3d4], ebx
test ebx, ebx
jne 0x1006c39e
push sym.nsInstall.dll_class_DuiLib::CDuiString_DuiLib::CPaintManagerUI::m_pStrResourcePath
lea ecx, [ebp - 0xcc]
call sym.nsInstall.dll_public:_void___thiscall_DuiLib::CDuiString::constructor_class_DuiLib::CDuiString_const__
mov dword [ebp - 4], esi
mov eax, dword [sym.nsInstall.dll_class_DuiLib::CDuiString_DuiLib::CPaintManagerUI::m_pStrResourceZip]
cmp word [eax], si
jne 0x1006c168
mov eax, dword [ebp + 8]
test eax, eax
je 0x1006c0b5
push eax
lea ecx, [ebp - 0xcc]
call sym.nsInstall.dll_public:_void___thiscall_DuiLib::CDuiString::Append_wchar_t_const__
push 0
push 0x80
push 3
push 0
push 1
push connect
push dword [ebp - 0xcc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3c4], eax
cmp eax, 0xffffffff
jne 0x1006c107
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc8]
mov eax, dword [ebp - 0xcc]
cmp eax, ecx
je 0x1006c480
push eax
call fcn.10265f8b
add esp, 4
jmp 0x1006c480
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x1006c0de
push esi
mov dword [ebp - 0x3cc], 0
call fcn.10260577
add esp, 4
mov edi, eax
lea eax, [ebp - 0x3cc]
push 0
push eax
push esi
push edi
push dword [ebp - 0x3c4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x3c4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3cc], esi
je 0x1006c33f
push edi
call fcn.10260580
add esp, 4
jmp 0x1006c0de
push eax
lea ecx, [ebp - 0xcc]
call sym.nsInstall.dll_public:_void___thiscall_DuiLib::CDuiString::Append_wchar_t_const__
cmp byte [sym.nsInstall.dll_bool_DuiLib::CPaintManagerUI::m_bCachedResourceZip], 0
je 0x1006c187
mov eax, dword [sym.nsInstall.dll_void__DuiLib::CPaintManagerUI::m_hResourceZip]
jmp 0x1006c29c
mov eax, dword [ebp - 0xcc]
push 0x340
mov dword [ebp - 0x3c8], eax
call fcn.1025fb94
mov esi, eax
add esp, 4
mov dword [ebp - 0x3c4], 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
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x1006c1d4
mov eax, dword [0x10329f00]
push 0
push 0x80
push 3
push 0
push 1
push connect
push dword [ebp - 0x3c8]
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3cc], eax
cmp eax, 0xffffffff
je 0x1006c368
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov esi, eax
cmp esi, 1
push 0x1c
sete bl
call fcn.1025fb94
mov edi, eax
add esp, 4
mov byte [edi], 1
mov byte [edi + 1], bl
mov ecx, dword [ebp - 0x3cc]
mov dword [edi + 4], ecx
mov byte [edi + 8], 0
mov dword [edi + 0xc], 0
cmp esi, 1
jne 0x1006c262
push esi
push 0
push 0
push dword [ebp - 0x3cc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [edi + 0xc], eax
mov ecx, edi
call fcn.10065610
mov esi, dword [ebp - 0x3c4]
mov dword [esi], eax
mov eax, dword [0x10365a1c]
mov dword [0x103658c8], eax
test eax, eax
jne 0x1006c385
push 8
call fcn.1025fb94
mov ebx, dword [ebp - 0x3d4]
add esp, 4
mov dword [eax], 1
mov dword [eax + 4], esi
mov dword [ebp - 0x3c0], eax
test eax, eax
je 0x1006c0de
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x3b4]
push ecx
lea ecx, [ebp - 0x3c8]
push ecx
push ecx
mov ecx, eax
call fcn.10066cd0
add esp, 0xc
test eax, eax
jne 0x1006c0de
mov esi, dword [ebp - 0x188]
test esi, esi
je 0x1006c0de
push esi
call fcn.10260577
mov edx, dword [ebp - 0x3c8]
mov edi, eax
mov ecx, dword [ebp - 0x3c0]
push esi
push edi
call fcn.10066e80
add esp, 0xc
test eax, eax
je 0x1006c32b
cmp eax, 0x600
je 0x1006c32b
push edi
call fcn.10260580
add esp, 4
cmp byte [sym.nsInstall.dll_bool_DuiLib::CPaintManagerUI::m_bCachedResourceZip], 0
jne 0x1006c0de
mov ecx, dword [ebp - 0x3c0]
call fcn.10066fd0
jmp 0x1006c0de
cmp byte [sym.nsInstall.dll_bool_DuiLib::CPaintManagerUI::m_bCachedResourceZip], 0
jne 0x1006c33f
mov ecx, dword [ebp - 0x3c0]
call fcn.10066fd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc8]
mov eax, dword [ebp - 0xcc]
cmp eax, ecx
je 0x1006c478
push eax
call fcn.10265f8b
add esp, 4
jmp 0x1006c478
push 0x340
push esi
mov dword [0x103658c8], 0x200
call fcn.1025fbc4
add esp, 8
jmp 0x1006c0de
mov ebx, dword [ebp - 0x3d4]
push 0x340
push esi
call fcn.1025fbc4
add esp, 8
jmp 0x1006c0de
mov ecx, str.COLOR
mov eax, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1006c3cb
test dx, dx
je 0x1006c3c7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1006c3cb
add eax, 4
add ecx, 4
test dx, dx
jne 0x1006c3a5
xor eax, eax
jmp 0x1006c3d0
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1006c3dc
lea edi, [eax + 1]
jmp 0x1006c520
mov eax, dword [sym.nsInstall.dll_struct_HINSTANCE____DuiLib::CPaintManagerUI::m_hResourceInstance]
test eax, eax
push ebx
push dword [ebp + 8]
cmove eax, dword [sym.nsInstall.dll_struct_HINSTANCE____DuiLib::CPaintManagerUI::m_hInstance]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [ebp - 0x3cc], esi
test esi, esi
je 0x1006c480
mov ecx, dword [sym.nsInstall.dll_struct_HINSTANCE____DuiLib::CPaintManagerUI::m_hResourceInstance]
test ecx, ecx
push esi
cmove ecx, dword [sym.nsInstall.dll_struct_HINSTANCE____DuiLib::CPaintManagerUI::m_hInstance]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x3c8], eax
push esi
test eax, eax
jne 0x1006c42f
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x1006c480
mov eax, dword [sym.nsInstall.dll_struct_HINSTANCE____DuiLib::CPaintManagerUI::m_hResourceInstance]
test eax, eax
cmove eax, dword [sym.nsInstall.dll_struct_HINSTANCE____DuiLib::CPaintManagerUI::m_hInstance]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
je 0x1006c480
push esi
call fcn.10260577
add esp, 4
mov edi, eax
push esi
push dword [ebp - 0x3c8]
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.102618f0
add esp, 0xc
push dword [ebp - 0x3cc]
call dword [sym.imp.KERNEL32.dll_FreeResource]
test edi, edi
jne 0x1006c520
push 0
push 0x80
push 3
push 0
push 1
push connect
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3c4], eax
cmp eax, 0xffffffff
je 0x1006c4fe
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x1006c4fe
push esi
mov dword [ebp - 0x3c8], 0
call fcn.10260577
add esp, 4
mov edi, eax
lea eax, [ebp - 0x3c8]
push 0
push eax
push esi
push edi
push dword [ebp - 0x3c4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x3c4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3c8], esi
je 0x1006c51c
push edi
call fcn.10260580
add esp, 4
xor eax, eax
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.102601ec
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x1006c4fe
mov dword [ebp - 0x3c0], 0
mov dword [ebp - 0x3d8], 1
mov dword [ebp - 0x3c4], 1
test ebx, ebx
je 0x1006c57f
mov ecx, str.COLOR
mov eax, ebx
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1006c576
test dx, dx
je 0x1006c572
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1006c576
add eax, 4
add ecx, 4
test dx, dx
jne 0x1006c550
xor eax, eax
jmp 0x1006c57b
sbb eax, eax
or eax, 1
test eax, eax
je 0x1006c5e4
lea eax, [esi + edi]
mov dword [ebp - 0x174], 0
mov dword [ebp - 0xd8], eax
lea edx, [ebp - 0x3d8]
push ecx
lea eax, [ebp - 0x3e0]
mov dword [ebp - 0x164], 0
push eax
lea eax, [ebp - 0x3c4]
mov dword [ebp - 0xd4], edi
push eax
lea ecx, [ebp - 0x184]
mov dword [ebp - 0xdc], edi
call fcn.100aaac0
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x3c0], esi
push edi
call fcn.10260580
add esp, 4
test esi, esi
je 0x1006c4fe
mov edx, dword [ebp - 0x3c4]
xorps xmm0, xmm0
mov ecx, dword [ebp - 0x3d8]
mov edi, edx
imul edi, ecx
mov eax, edx
neg eax
movlpd qword [ebp - 0x28], xmm0
mov dword [ebp - 0x38], eax
push 0
push 0
movlpd qword [ebp - 0x20], xmm0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x40], 0x28
lea eax, [edi*4]
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x3bc]
push eax
push 0
lea eax, [ebp - 0x40]
mov dword [ebp - 0x34], 0x200001
push eax
push 0
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x3b5], 0
mov dword [ebp - 0x3bc], 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x3e0], eax
test eax, eax
je 0x1006c4fe
mov dword [ebp - 0x3d0], 0
test ebx, ebx
je 0x1006c712
mov ecx, str.COLOR
mov eax, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1006c6a9
test dx, dx
je 0x1006c6a5
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1006c6a9
add eax, 4
add ecx, 4
test dx, dx
jne 0x1006c683
xor eax, eax
jmp 0x1006c6ae
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1006c712
mov dword [ebp - 0x3cc], eax
mov eax, dword [ebp + 8]
cmp word [eax], 0x23
jne 0x1006c6c8
push eax
call dword [sym.imp.USER32.dll_CharNextW]
push 0x10
lea ecx, [ebp - 0x3cc]
push ecx
push eax
call fcn.1027583e
mov dword [ebp - 0x3c8], eax
lea edx, [ebp - 0x3d0]
mov cl, byte [ebp - 0x3c5]
add esp, 0xc
mov byte [ebp - 0x3ce], al
mov al, byte [ebp - 0x3c6]
mov byte [ebp - 0x3cd], cl
mov byte [ebp - 0x3cf], ah
mov byte [ebp - 0x3d0], al
mov dword [ebp - 0x3c0], edx
jmp 0x1006c718
mov edx, dword [ebp - 0x3c0]
xor esi, esi
test edi, edi
jle 0x1006c825
mov ebx, edi
nop dword [eax]
nop dword [eax + eax]
mov eax, dword [ebp - 0x3bc]
mov cl, byte [edx + esi*4 + 3]
mov byte [eax + esi*4 + 3], cl
mov eax, dword [ebp - 0x3bc]
cmp byte [eax + esi*4 + 3], 0xff
lea edi, [eax + esi*4]
jae 0x1006c7b9
movzx eax, byte [edx + esi*4 + 3]
movzx ecx, byte [edx + esi*4 + 2]
imul ecx, eax
mov eax, 0x80808081
mov byte [ebp - 0x3b5], 1
mul ecx
shr edx, 7
mov byte [edi], dl
mov edi, dword [ebp - 0x3c0]
movzx eax, byte [edi + esi*4 + 3]
movzx ecx, byte [edi + esi*4 + 1]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x3bc]
shr edx, 7
mov byte [eax + esi*4 + 1], dl
movzx eax, byte [edi + esi*4 + 3]
movzx ecx, byte [edi + esi*4]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x3bc]
shr edx, 7
mov byte [eax + esi*4 + 2], dl
mov edx, edi
jmp 0x1006c7dc
mov al, byte [edx + esi*4 + 2]
mov byte [edi], al
mov eax, dword [ebp - 0x3bc]
movzx ecx, byte [edx + esi*4 + 1]
mov byte [eax + esi*4 + 1], cl
mov eax, dword [ebp - 0x3bc]
movzx ecx, byte [edx + esi*4]
mov byte [eax + esi*4 + 2], cl
mov eax, dword [ebp - 0x3bc]
mov ecx, dword [ebp + 0x10]
cmp dword [eax + esi*4], ecx
jne 0x1006c816
mov byte [eax + esi*4], 0
mov eax, dword [ebp - 0x3bc]
mov byte [ebp - 0x3b5], 1
mov byte [eax + esi*4 + 1], 0
mov eax, dword [ebp - 0x3bc]
mov byte [eax + esi*4 + 2], 0
mov eax, dword [ebp - 0x3bc]
mov byte [eax + esi*4 + 3], 0
inc esi
cmp esi, ebx
jl 0x1006c730
mov ebx, dword [ebp - 0x3d4]
test ebx, ebx
je 0x1006c85f
mov eax, str.COLOR
nop
mov cx, word [ebx]
cmp cx, word [eax]
jne 0x1006c856
test cx, cx
je 0x1006c852
mov cx, word [ebx + 2]
cmp cx, word [eax + 2]
jne 0x1006c856
add ebx, 4
add eax, 4
test cx, cx
jne 0x1006c830
xor eax, eax
jmp 0x1006c85b
sbb eax, eax
or eax, 1
test eax, eax
je 0x1006c868
push edx
call fcn.10265f8b
add esp, 4
push 0xa0
call fcn.1025fb94
add esp, 4
mov dword [ebp - 0x3dc], eax
xor edx, edx
lea ecx, [eax + 0x1c]
mov dword [eax + 0x18], ecx
mov word [ecx], dx
mov ecx, dword [ebp - 0x3e0]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x3bc]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x3d8]
mov dword [eax + 0xc], ecx
mov ecx, dword [ebp - 0x3c4]
mov dword [eax + 0x10], ecx
mov cl, byte [ebp - 0x3b5]
mov byte [eax + 0x14], cl
mov byte [eax + 0x15], dl
mov dword [eax + 8], edx
jmp 0x1006c500