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

Disassembly:
sub esp, 0x78
and dword [esp + 0x18], 0
push ebx
push ebp
push esi
push edi
push 0x10
call fcn.0042ffa7
mov ebx, eax
push 0x10
mov dword [esp + 0x1c], ebx
call fcn.0042ff83
mov esi, dword [esp + 0x94]
mov edi, eax
push esi
call dword [sym.imp.GDI32.dll_GetObjectType]
cmp eax, 7
jne 0x41d0db
lea eax, [esp + 0x70]
push eax
push 0x18
push esi
call dword [sym.imp.GDI32.dll_GetObjectW]
cmp dword [esp + 0x74], ebx
jne 0x41d0b4
cmp dword [esp + 0x78], edi
je 0x41d0db
movzx eax, word [esp + 0x82]
push 0
push eax
push edi
push ebx
push dword [esp + 0x88]
push dword [esp + 0x88]
push esi
call fcn.004310b9
mov dword [esp + 0x28], eax
mov esi, eax
push esi
call fcn.004325a1
mov ebp, dword [esp + 0x8c]
test eax, eax
je 0x41d152
push ebp
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebx, eax
test ebx, ebx
je 0x41d14e
push 1
push ebx
push esi
call fcn.004321eb
mov esi, eax
test esi, esi
je 0x41d142
mov eax, dword [esp + 0x90]
push 0xff
push ebx
push esi
mov ecx, dword [eax + 4]
mov eax, dword [eax + 0xc]
sub eax, ecx
sub eax, edi
cdq
sub eax, edx
push edi
push dword [esp + 0x28]
sar eax, 1
inc eax
add eax, ecx
push eax
push 2
call fcn.0042ffa7
push eax
push ebp
call fcn.004323f1
push esi
call fcn.004324b0
push ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x41d3eb
mov ebx, dword [esp + 0x18]
push esi
call dword [sym.imp.GDI32.dll_GetObjectType]
cmp eax, 7
jne 0x41d196
mov eax, dword [esp + 0x90]
push 0x24
push edi
push ebx
mov ecx, dword [eax + 4]
mov eax, dword [eax + 0xc]
sub eax, ecx
sub eax, edi
cdq
sub eax, edx
sar eax, 1
inc eax
add eax, ecx
push eax
push 2
call fcn.0042ffa7
push eax
xor eax, eax
push eax
push esi
push eax
push eax
push ebp
call dword [sym.imp.USER32.dll_DrawStateW]
jmp 0x41d3eb
lea eax, [esp + 0x44]
push eax
push esi
call dword [sym.imp.USER32.dll_GetIconInfo]
lea eax, [esp + 0x58]
push eax
push 0x18
push dword [esp + 0x58]
call dword [sym.imp.GDI32.dll_GetObjectW]
mov eax, dword [esp + 0x5c]
mov ebx, dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x60]
push ebp
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
call ebx
mov edi, eax
test edi, edi
je 0x41d3d7
push dword [esp + 0x54]
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x90]
push 0xcc0020
mov eax, dword [ecx + 4]
add eax, 2
push eax
mov eax, dword [ecx]
add eax, 2
push eax
push ebp
push dword [esp + 0x24]
push dword [esp + 0x2c]
push 0
push 0
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
push 3
push 0
push 0
push dword [esp + 0x20]
push dword [esp + 0x28]
push esi
push 0
push 0
push edi
call dword [sym.imp.USER32.dll_DrawIconEx]
push ebp
call ebx
mov dword [esp + 0x24], eax
test eax, eax
je 0x41d3d0
push dword [esp + 0x50]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
fild dword [esp + 0x1c]
xor ebx, ebx
fstp qword [esp + 0x2c]
fld qword [esp + 0x2c]
fild dword [esp + 0x5c]
fstp qword [esp + 0x2c]
fdiv qword [esp + 0x2c]
fstp qword [esp + 0x3c]
fild dword [esp + 0x10]
mov dword [esp + 0x10], ebx
fstp qword [esp + 0x2c]
fld qword [esp + 0x2c]
fild dword [esp + 0x60]
fstp qword [esp + 0x2c]
fdiv qword [esp + 0x2c]
mov ecx, dword [esp + 0x60]
fstp qword [esp + 0x34]
test ecx, ecx
jle 0x41d38d
mov eax, dword [esp + 0x5c]
mov ebp, dword [esp + 0x24]
xor esi, esi
mov dword [esp + 0x1c], esi
test eax, eax
jle 0x41d379
push ebx
push esi
push ebp
call dword [sym.imp.GDI32.dll_GetPixel]
test eax, eax
jne 0x41d364
fild dword [esp + 0x10]
fstp qword [esp + 0x2c]
fld qword [esp + 0x2c]
fmul qword [esp + 0x34]
call fcn.004161f0
fild dword [esp + 0x1c]
mov ebx, eax
mov dword [esp + 0x2c], ebx
fstp qword [esp + 0x1c]
fld qword [esp + 0x1c]
fmul qword [esp + 0x3c]
call fcn.004161f0
push ebx
push eax
push edi
mov dword [esp + 0x28], eax
call dword [sym.imp.GDI32.dll_GetPixel]
mov ebx, eax
mov ecx, ebx
shr ecx, 8
movzx edx, cl
movzx ecx, bl
shr ebx, 0x10
push 0xa
lea ecx, [ecx + edx*2]
imul eax, ecx, 3
movzx ecx, bl
add eax, ecx
cdq
pop ecx
idiv ecx
cmp al, 0x40
jae 0x41d32d
movzx eax, al
sub eax, 0x40
imul eax, eax, 7
cdq
idiv ecx
add al, 0x40
jmp 0x41d341
cmp al, 0xc0
jbe 0x41d341
movzx eax, al
sub eax, 0xc0
imul eax, eax, 7
cdq
idiv ecx
sub al, 0x40
movzx eax, al
mov ecx, eax
shl ecx, 8
or ecx, eax
shl ecx, 8
or ecx, eax
push ecx
push dword [esp + 0x30]
push dword [esp + 0x24]
push edi
call dword [sym.imp.GDI32.dll_SetPixel]
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x5c]
inc esi
mov dword [esp + 0x1c], esi
cmp esi, eax
jl 0x41d2aa
mov ecx, dword [esp + 0x60]
inc ebx
mov dword [esp + 0x10], ebx
cmp ebx, ecx
jl 0x41d29c
mov ebp, dword [esp + 0x8c]
mov ebx, dword [esp + 0x90]
push 0xcc0020
push 0
push 0
mov eax, dword [ebx + 0xc]
sub eax, dword [ebx + 4]
sub eax, 0x10
cdq
push edi
push dword [esp + 0x24]
sub eax, edx
push dword [esp + 0x2c]
sar eax, 1
inc eax
add eax, dword [ebx + 4]
push eax
mov eax, dword [ebx]
add eax, 2
push eax
push ebp
call dword [sym.imp.GDI32.dll_BitBlt]
push dword [esp + 0x24]
call dword [sym.imp.GDI32.dll_DeleteDC]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
push dword [esp + 0x50]
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [esp + 0x54]
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esp + 0x28]
pop edi
pop esi
pop ebp
pop ebx
test eax, eax
je 0x41d3fe
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
add esp, 0x78
ret