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

Disassembly:
sub esp, 0xa8
mov ecx, dword [esp + 0xb0]
push ebx
push ebp
push esi
test ecx, ecx
push edi
mov dword [esp + 0x44], 0
jl 0x10004e50
mov eax, dword [esp + 0xc4]
test eax, eax
jl 0x10004e50
xor edx, edx
mov esi, ecx
mov dl, ch
and esi, 0xff
and edx, 0xff
xor ebp, ebp
mov edi, edx
mov ebx, esi
sar ecx, 0x10
sub edi, eax
and ecx, 0xff
mov dword [esp + 0x4c], edi
mov edi, ecx
push ebp
push ebp
sub ebx, eax
sub edi, eax
add esi, eax
add edx, eax
add ecx, eax
push ebp
push str.DISPLAY
mov dword [esp + 0x78], ebx
mov dword [esp + 0x50], edi
mov dword [esp + 0x44], esi
mov dword [esp + 0x4c], edx
mov dword [esp + 0x60], ecx
call dword [sym.imp.GDI32.dll_CreateDCA]
mov edi, eax
push edi
mov dword [esp + 0x1c], edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov esi, dword [esp + 0xbc]
lea eax, [esp + 0xa0]
push eax
push 0x18
push esi
call dword [sym.imp.GDI32.dll_GetObjectA]
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa8]
mov dword [esp + 0x7c], eax
mov dword [esp + 0x78], 0x28
lea edx, [eax + eax*2]
mov dword [esp + 0x80], ecx
mov word [esp + 0x84], 1
mov word [esp + 0x86], 0x18
lea eax, [edx*8 + 0x1f]
mov dword [esp + 0x88], ebp
cdq
and edx, 0x1f
mov dword [esp + 0x8c], ebp
add eax, edx
mov dword [esp + 0x90], ebp
sar eax, 5
imul eax, ecx
shl eax, 2
push eax
push 0x42
mov dword [esp + 0x9c], ebp
mov dword [esp + 0xa0], ebp
mov dword [esp + 0xa4], ebp
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, ebp
mov dword [esp + 0x38], eax
je 0x10004e50
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push 0xf
mov dword [esp + 0x2c], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
cmp eax, ebp
mov dword [esp + 0x14], eax
je 0x10004b07
push ebp
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
mov eax, dword [esp + 0x14]
push ebp
push eax
push edi
mov dword [esp + 0x24], edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
mov dword [esp + 0x48], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0xa8]
lea ecx, [esp + 0x78]
push ebp
push ecx
push edx
push eax
push ebp
push esi
push edi
call dword [sym.imp.GDI32.dll_GetDIBits]
mov ecx, dword [esp + 0xa8]
mov eax, dword [esp + 0xa4]
dec ecx
mov edi, eax
lea esi, [eax + eax*2]
mov edx, ecx
and edi, 0x80000003
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], edx
jns 0x10004b4e
dec edi
or edi, 0xfffffffc
inc edi
add edi, esi
mov esi, dword [esp + 0xc8]
cmp esi, ebp
jne 0x10004bfb
imul ecx, edi
mov ebp, ecx
xor esi, esi
test ebp, ebp
jl 0x10004dc5
mov eax, dword [esp + 0x28]
lea edx, [esi + ebp]
add eax, edx
xor ecx, ecx
xor edx, edx
mov cl, byte [eax + 1]
mov dl, byte [eax]
mov dword [esp + 0x14], ecx
xor ecx, ecx
mov cl, byte [eax + 2]
mov eax, ecx
mov ecx, dword [esp + 0x50]
cmp edx, ecx
jg 0x10004bb5
cmp edx, dword [esp + 0x40]
jl 0x10004bb5
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x3c]
cmp ecx, edx
jg 0x10004bb5
cmp ecx, dword [esp + 0x4c]
jl 0x10004bb5
cmp eax, dword [esp + 0x34]
jg 0x10004bb5
cmp eax, ebx
jge 0x10004bcd
mov eax, dword [esp + 0x2c]
add esi, 3
cmp esi, eax
jl 0x10004bc4
xor esi, esi
sub ebp, edi
test ebp, ebp
jge 0x10004b6e
jmp 0x10004dc5
test ebp, ebp
jl 0x10004dc5
mov eax, 0x55555556
mov ecx, dword [esp + 0x30]
imul esi
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ebp
mov dword [esp + 0x20], edx
cdq
idiv edi
sub ecx, eax
mov dword [esp + 0x24], ecx
jmp 0x10004dd0
cmp esi, 1
jne 0x10004e32
mov ebp, edi
xor esi, esi
imul ebp, edx
dec eax
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fmul qword [0x1000d730]
fstp qword [esp + 0x58]
fild dword [esp + 0x30]
fmul qword [0x1000d730]
fstp qword [esp + 0x70]
fld qword [0x1000d740]
fld qword [esp + 0x58]
call sub.MSVCRT.dll__ftol
mov edx, dword [esp + 0x2c]
lea ecx, [eax + eax*2]
xor eax, eax
add edx, 0xfffffffd
cmp ebp, eax
mov dword [esp + 0x1c], ecx
mov byte [esp + 0x13], 0
mov dword [esp + 0x48], eax
mov dword [esp + 0x54], edx
mov dword [esp + 0x14], eax
jl 0x10004dc3
mov ecx, dword [esp + 0x28]
lea eax, [esi + ebp]
add eax, ecx
xor ebx, ebx
xor ecx, ecx
xor edx, edx
mov bl, byte [eax + 2]
mov cl, byte [eax]
mov dl, byte [eax + 1]
mov eax, ebx
cmp ecx, dword [esp + 0x50]
jg 0x10004d72
cmp ecx, dword [esp + 0x40]
jl 0x10004d72
cmp edx, dword [esp + 0x3c]
jg 0x10004d72
cmp edx, dword [esp + 0x4c]
jl 0x10004d72
cmp eax, dword [esp + 0x34]
jg 0x10004d72
cmp eax, dword [esp + 0x68]
jl 0x10004d72
mov eax, 0x55555556
mov ecx, dword [esp + 0x30]
imul esi
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ebp
mov esi, edx
cdq
idiv edi
mov dword [esp + 0x6c], esi
fild dword [esp + 0x6c]
fsub qword [esp + 0x58]
sub ecx, eax
mov dword [esp + 0x60], ecx
fild dword [esp + 0x60]
fsub qword [esp + 0x70]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fst qword [esp + 0x60]
fstp st(2)
fstp st(0)
fcomp st(1)
fnstsw ax
test ah, 1
je 0x10004d61
fstp st(0)
fld qword [esp + 0x60]
fld qword [esp + 0x60]
fsqrt
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], ecx
fld qword [esp + 0x58]
fsub st(1)
call sub.MSVCRT.dll__ftol
fld st(0)
fadd qword [esp + 0x58]
lea esi, [eax + eax*2]
call sub.MSVCRT.dll__ftol
fld qword [esp + 0x70]
fsub st(1)
lea ebx, [eax + eax*2]
call sub.MSVCRT.dll__ftol
imul eax, edi
fstp st(0)
test esi, esi
jl 0x10004d4f
mov dword [esp + 0x48], esi
cmp ebx, dword [esp + 0x2c]
jge 0x10004d59
mov dword [esp + 0x54], ebx
test eax, eax
jl 0x10004d61
mov dword [esp + 0x14], eax
mov al, byte [esp + 0x13]
test al, al
jne 0x10004d9e
mov ecx, dword [esp + 0x1c]
lea esi, [ecx + 3]
jmp 0x10004da4
mov al, byte [esp + 0x13]
test al, al
jne 0x10004d93
mov eax, dword [esp + 0x48]
sub esi, 3
cmp esi, eax
jge 0x10004daa
mov edx, dword [esp + 0x1c]
mov byte [esp + 0x13], 0xff
lea esi, [edx + 3]
jmp 0x10004daa
mov ecx, dword [esp + 0x54]
add esi, 3
cmp esi, ecx
jle 0x10004daa
mov esi, dword [esp + 0x1c]
sub ebp, edi
not al
mov byte [esp + 0x13], al
cmp ebp, dword [esp + 0x14]
jge 0x10004c64
fcomp qword [0x1000d740]
fnstsw ax
test ah, 1
jne 0x10004dd0
jmp 0x10004dc5
fstp st(0)
or eax, 0xffffffff
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xcc]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0xd0]
mov dword [eax], ecx
mov eax, dword [esp + 0x24]
mov dword [edx], eax
mov eax, dword [esp + 0x44]
test eax, eax
je 0x10004e10
mov esi, dword [esp + 0x18]
push 1
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
push esi
call dword [sym.imp.GDI32.dll_RealizePalette]
push esi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov esi, dword [esp + 0x38]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa8
ret
mov ecx, dword [esp + 0x18]
push ecx
push ebp
call dword [sym.imp.USER32.dll_ReleaseDC]
mov esi, dword [esp + 0x38]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xa8
ret