Function at 0x100142c0
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x98
mov eax, dword [0x100df00c]
xor eax, esp
mov dword [esp + 0x94], eax
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x6c]
push esi
push edi
push ecx
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0xc]
push 0x18
push eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x38], 0
call dword [sym.imp.GDI32.dll_GetObjectW]
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jne 0x1001431a
movzx ecx, word [esp + 0x86]
movzx eax, word [esp + 0x84]
imul ecx, eax
cmp ecx, 1
jg 0x10014329
mov edx, 1
lea ecx, [edx + 1]
jmp 0x10014353
cmp ecx, 4
jg 0x10014338
mov edx, 4
lea ecx, [edx + 0xc]
jmp 0x10014353
cmp ecx, 8
jg 0x10014349
mov edx, 8
mov ecx, 0x100
jmp 0x10014353
mov edx, 0x18
mov ecx, 0x1000000
mov eax, dword [esp + 0x78]
xorps xmm0, xmm0
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x48], eax
mov eax, 1
mov word [esp + 0x4c], ax
xor eax, eax
cmp ecx, 0x100
movlpd qword [esp + 0x50], xmm0
push 0
cmovbe eax, ecx
movlpd qword [esp + 0x5c], xmm0
shl eax, 2
mov dword [esp + 0x2c], eax
add eax, 0x28
movlpd qword [esp + 0x64], xmm0
mov dword [esp + 0x44], 0x28
mov word [esp + 0x52], dx
mov dword [esp + 0x14], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edi, eax
test edi, edi
je 0x10014604
push 1
push 1
push edi
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov esi, eax
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
je 0x100145fd
push esi
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x20], eax
call sym.HncBaseDraw.dll_HncDRGetDefPalette
push 0
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
mov dword [esp + 0x20], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [esp + 0x10]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
mov dword [esp + 0x18], esi
push 0
test esi, esi
je 0x100145db
movups xmm0, xmmword [esp + 0x44]
push esi
push 0
push dword [esp + 0x3c]
movups xmmword [esi], xmm0
push 0
movups xmm0, xmmword [esp + 0x64]
push dword [esp + 0x28]
movups xmmword [esi + 0x10], xmm0
push edi
movq xmm0, qword [esp + 0x7c]
movq qword [esi + 0x20], xmm0
call dword [sym.imp.GDI32.dll_GetDIBits]
movups xmm1, xmmword [esi + 0x10]
movups xmm0, xmmword [esi]
psrldq xmm1, 4
movd ecx, xmm1
movups xmmword [esp + 0x40], xmm0
movq xmm0, qword [esi + 0x20]
movq qword [esp + 0x60], xmm0
test ecx, ecx
jne 0x10014495
mov eax, dword [esp + 0x4c]
shr eax, 0x10
imul eax, dword [esp + 0x44]
add eax, 0x1f
and eax, 0xffffffe0
cdq
and edx, 7
lea ecx, [edx + eax]
sar ecx, 3
imul ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x10]
add eax, ecx
mov dword [esp + 0x10], eax
je 0x100144b9
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
test eax, eax
je 0x100145d2
mov esi, eax
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x28]
add eax, dword [esp + 0x40]
push 0
push esi
add eax, esi
push eax
push dword [esp + 0x54]
push 0
push dword [esp + 0x28]
push edi
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
je 0x10014586
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push dword [esp + 0x50]
call dword [sym.imp.HncFoundation.dll_HncCreateFile]
mov ecx, eax
mov dword [esp + 0x14], ecx
cmp ecx, 0xffffffff
je 0x10014586
mov edx, dword [esp + 0x40]
mov eax, 0x4d42
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
add edx, 0xe
mov word [esp + 0x8c], ax
mov eax, dword [esp + 0x10]
add eax, 0xe
mov dword [esp + 0x92], 0
mov dword [esp + 0x8e], eax
mov eax, dword [esp + 0x28]
add eax, edx
push 0
mov dword [esp + 0x9a], eax
lea eax, [esp + 0x40]
push eax
push 0xe
lea eax, [esp + 0x98]
push eax
push ecx
call esi
push 0
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x18]
push dword [esp + 0x24]
push dword [esp + 0x24]
call esi
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x2c], 1
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [sym.imp.GDI32.dll_SelectPalette]
push 0
push dword [esp + 0x20]
push edi
call eax
push dword [esp + 0x20]
mov eax, dword [sym.imp.GDI32.dll_SelectObject]
push edi
call eax
push dword [esp + 0x24]
call dword [sym.imp.GDI32.dll_DeleteObject]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x2c]
pop edi
pop esi
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.100be194
mov esp, ebp
pop ebp
ret 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0
push dword [esp + 0x20]
mov eax, dword [sym.imp.GDI32.dll_SelectPalette]
push edi
call eax
push dword [esp + 0x20]
mov eax, dword [sym.imp.GDI32.dll_SelectObject]
push edi
call eax
push dword [esp + 0x24]
call dword [sym.imp.GDI32.dll_DeleteObject]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov ecx, dword [esp + 0x9c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.100be194
mov esp, ebp
pop ebp
ret 0xc