Function at 0x1005c700
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x98
mov eax, dword [0x101109b4]
push esi
mov esi, ecx
mov ecx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [esp + 0x14], esi
push edi
mov edi, edx
mov dword [esp + 0x50], edi
test al, 1
jne 0x1005c754
push 0x100f7d2c
or eax, 1
push str.msimg32.dll
mov dword [0x101109b4], eax
call ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x101109b8], eax
mov eax, dword [0x101109b4]
test al, 2
jne 0x1005c77d
push str.GradientFill
or eax, 2
push str.msimg32.dll
mov dword [0x101109b4], eax
call ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, eax
mov dword [0x101109bc], edx
jmp 0x1005c783
mov edx, dword [0x101109bc]
test esi, esi
je 0x1005cadd
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
shr ecx, 0x18
shr eax, 0x18
add ecx, eax
shr ecx, 1
mov dword [esp + 0x6c], ecx
test cl, cl
je 0x1005cadd
mov esi, dword [edi + 0xc]
sub esi, dword [edi + 4]
movups xmm0, xmmword [edi]
mov eax, dword [edi + 8]
sub eax, dword [edi]
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x18]
mov dword [esp + 0x54], eax
movaps xmmword [esp + 0x70], xmm0
movaps xmmword [esp + 0x30], xmm0
mov dword [esp + 0x4c], esi
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
cmp cl, 0xff
jae 0x1005c84f
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x2c]
push esi
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x40], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push dword [esp + 0x2c]
mov esi, eax
push dword [esp + 0x58]
mov dword [esp + 0x54], esi
push dword [esp + 0x20]
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov dword [esp + 0x5c], eax
test eax, eax
je 0x1005c926
test esi, esi
je 0x1005cadd
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
movaps xmm0, xmmword [esp + 0x30]
mov edx, dword [0x101109bc]
mov dword [esp + 0x58], eax
movaps xmmword [esp + 0x70], xmm0
mov ecx, dword [ebp + 8]
test edx, edx
je 0x1005c93b
mov eax, dword [esp + 0x30]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x74], eax
movzx eax, cl
shl ax, 8
mov word [esp + 0x78], ax
mov eax, ecx
shr eax, 8
movzx eax, al
shl ax, 8
mov word [esp + 0x7a], ax
shr ecx, 0x10
movzx eax, cl
mov ecx, dword [ebp + 0xc]
shl ax, 8
mov word [esp + 0x7c], ax
mov eax, 0xff00
mov word [esp + 0x7e], ax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x84], eax
movzx eax, cl
shl ax, 8
mov word [esp + 0x88], ax
mov eax, ecx
shr eax, 8
movzx eax, al
shl ax, 8
mov word [esp + 0x8a], ax
shr ecx, 0x10
movzx eax, cl
shl ax, 8
mov word [esp + 0x8c], ax
mov eax, 0xff00
push 1
push 1
mov word [esp + 0x96], ax
lea eax, [esp + 0x38]
push eax
push 2
lea eax, [esp + 0x80]
mov dword [esp + 0x40], 0
push eax
push esi
mov dword [esp + 0x4c], 1
call edx
jmp 0x1005ca85
test esi, esi
je 0x1005cadd
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov esi, ecx
shr esi, 0x10
mov edx, eax
mov dword [esp + 0x60], esi
xor edi, edi
mov si, ax
shr edx, 0x10
shr si, 8
mov word [esp + 0x1e], si
mov si, cx
movzx ecx, cl
movzx eax, al
shr si, 8
mov dword [esp + 0x68], ecx
mov ecx, eax
neg ecx
mov word [esp + 0x14], si
mov esi, 2
mov dword [esp + 0x20], edi
add eax, eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x28], edi
mov dword [esp + 0x48], esi
mov dword [esp + 0x64], ecx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x60]
movzx eax, al
imul eax, edi
movzx ecx, dl
imul ecx, esi
add ecx, eax
mov ax, word [esp + 0x1e]
sar ecx, 1
movzx edx, cl
movzx ecx, al
mov ax, word [esp + 0x14]
movzx eax, al
imul eax, edi
imul ecx, esi
shl edx, 8
add ecx, eax
sar ecx, 1
movzx eax, cl
or edx, eax
mov eax, dword [esp + 0x28]
add eax, dword [esp + 0x24]
sar eax, 1
shl edx, 8
movzx eax, al
or edx, eax
push edx
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov dword [esp + 0x44], eax
test eax, eax
je 0x1005ca57
mov eax, dword [esp + 0x50]
movaps xmm0, xmmword [esp + 0x70]
movaps xmmword [esp + 0x90], xmm0
mov edi, dword [eax + 0xc]
mov edx, edi
sub edx, dword [eax + 4]
mov esi, edi
mov eax, dword [esp + 0x20]
mov ecx, edx
imul ecx, eax
inc eax
imul eax, edx
sar ecx, 1
sub esi, ecx
sar eax, 1
sub edi, eax
mov dword [esp + 0x9c], esi
sub esi, edi
mov dword [esp + 0x94], edi
test esi, esi
mov esi, dword [esp + 0x44]
jle 0x1005ca48
push esi
lea eax, [esp + 0x94]
push eax
push dword [esp + 0x20]
call dword [sym.imp.USER32.dll_FillRect]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, dword [esp + 0x48]
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x64]
dec esi
add dword [esp + 0x24], eax
inc edi
mov eax, dword [esp + 0x68]
add dword [esp + 0x28], eax
mov edx, dword [esp + 0x30]
mov dword [esp + 0x20], edi
mov dword [esp + 0x48], esi
test esi, esi
jg 0x1005c993
mov esi, dword [esp + 0x4c]
mov edi, dword [esp + 0x50]
mov eax, dword [esp + 0x6c]
cmp al, 0xff
jae 0x1005cadd
mov ecx, dword [esp + 0x2c]
mov byte [esp + 0x16], al
mov eax, dword [esp + 0x54]
mov word [esp + 0x14], 0
mov byte [esp + 0x17], 1
push dword [esp + 0x14]
push ecx
push eax
push 0
push 0
push esi
push ecx
push eax
push dword [edi + 4]
push dword [edi]
push dword [esp + 0x40]
call dword [0x101109b8]
push dword [esp + 0x58]
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [esp + 0x5c]
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop esi
mov esp, ebp
pop ebp
ret