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

Disassembly:
sub esp, 0x50
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
push ebx
mov ebx, dword [esp + 0x60]
push ebp
push esi
xor esi, esi
push edi
mov edi, dword [esp + 0x8c]
mov byte [esp + 0x16], 0
mov byte [esp + 0x17], 0
mov dword [esp + 0x2c], esi
mov dword [esp + 0x18], esi
cmp dword [eax], ecx
jne 0x4965a9
mov dword [eax], esi
mov byte [esp + 0x17], 1
mov ebp, dword [esp + 0x70]
cmp ebx, esi
jne 0x4965dd
cmp ebp, esi
jne 0x4965dd
lea eax, [esp + 0x34]
push eax
push 0x18
push ecx
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x496852
mov ecx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ecx
mov ebp, ecx
cmp dword [esp + 0x7c], esi
jne 0x4965e7
mov dword [esp + 0x7c], ebx
cmp dword [esp + 0x80], esi
jne 0x4965f7
mov dword [esp + 0x80], ebp
push esi
mov esi, dword [sym.imp.GDI32.dll_CreateCompatibleDC]
call esi
mov dword [esp + 0x1c], eax
test eax, eax
je 0x496852
push 0
call esi
mov esi, eax
mov dword [esp + 0x28], esi
test esi, esi
je 0x496828
mov edx, dword [esp + 0x64]
cmp dword [edx], 0
jne 0x4966ac
push 0x2c
lea eax, [esp + 0x38]
push 0
push eax
call fcn.004ce290
mov edx, dword [esp + 0x28]
add esp, 0xc
push 0
push 0
lea eax, [esp + 0x20]
push eax
push 0
lea ecx, [esp + 0x44]
push ecx
push edx
mov dword [esp + 0x4c], 0x28
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebp
mov dword [esp + 0x58], 0x200001
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ecx, dword [esp + 0x64]
mov dword [ecx], eax
test eax, eax
je 0x496828
mov eax, dword [esp + 0x84]
test eax, eax
je 0x49668e
mov edx, dword [esp + 0x18]
mov dword [eax], edx
cmp edi, 0xffffffff
je 0x4966e3
mov ecx, ebx
imul ecx, ebp
xor eax, eax
test ecx, ecx
je 0x4966e3
mov edx, dword [esp + 0x18]
mov dword [edx + eax*4], edi
inc eax
cmp eax, ecx
jb 0x49669e
jmp 0x4966e3
cmp edi, 0xffffffff
je 0x4966e3
test ebp, ebp
jle 0x4966e3
xor edx, edx
mov dword [esp + 0x20], ebp
test ebx, ebx
jle 0x4966d4
mov eax, edx
mov ecx, ebx
mov esi, dword [esp + 0x18]
mov dword [eax + esi], edi
add eax, 4
dec ecx
jne 0x4966c3
mov esi, dword [esp + 0x28]
lea eax, [ebx*4]
add edx, eax
dec dword [esp + 0x20]
jne 0x4966bb
mov eax, dword [esp + 0x64]
mov ecx, dword [eax]
mov edx, dword [esp + 0x1c]
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
push ecx
push edx
call edi
mov dword [esp + 0x30], eax
test eax, eax
je 0x49682e
mov eax, dword [esp + 0x68]
push eax
push esi
call edi
mov dword [esp + 0x2c], eax
test eax, eax
je 0x49681a
cmp dword [esp + 0x7c], ebx
jne 0x496765
cmp dword [esp + 0x80], ebp
jne 0x496765
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x1c]
push 0xcc0020
push ecx
push edx
push esi
push ebp
push ebx
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
test eax, eax
je 0x49681a
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x1c]
push ecx
push edx
mov byte [esp + 0x1e], 1
call edi
jmp 0x49682e
cmp dword [esp + 0x18], 0
je 0x49681a
cmp dword [esp + 0x88], 0
je 0x49681a
fild dword [esp + 0x6c]
mov dword [esp + 0x6c], 0
fidiv dword [esp + 0x7c]
fild dword [esp + 0x70]
fidiv dword [esp + 0x80]
test ebp, ebp
jle 0x496811
xor esi, esi
mov dword [esp + 0x24], esi
xor edi, edi
mov dword [esp + 0x20], edi
test ebx, ebx
jle 0x4967ed
fild dword [esp + 0x6c]
fdiv st(1)
call fcn.004d3dc0
mov ebp, eax
imul ebp, dword [esp + 0x7c]
fild dword [esp + 0x20]
fdiv st(2)
call fcn.004d3dc0
mov ecx, dword [esp + 0x88]
add eax, ebp
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x18]
inc edi
mov dword [esi + eax], edx
add esi, 4
mov dword [esp + 0x20], edi
cmp edi, ebx
jl 0x4967bf
mov ebp, dword [esp + 0x70]
mov ecx, dword [esp + 0x6c]
mov esi, dword [esp + 0x24]
inc ecx
lea eax, [ebx*4]
add esi, eax
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x24], esi
cmp ecx, ebp
jl 0x4967a3
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
fstp st(1)
mov byte [esp + 0x16], 1
fstp st(0)
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x1c]
push ecx
push edx
call edi
jmp 0x49682e
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.GDI32.dll_DeleteDC]
push eax
call esi
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x496852
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x49684f
push eax
push ebx
call edi
push ebx
call esi
cmp byte [esp + 0x17], 0
je 0x49686d
mov ecx, dword [esp + 0x64]
cmp dword [ecx], 0
je 0x49686d
mov edx, dword [esp + 0x68]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov al, byte [esp + 0x16]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret