Function at 0x402a20
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x407700
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebp
push esi
mov esi, ecx
push edi
fld dword [esi + 0x1c]
fsin
mov eax, dword [esi + 0x24]
mov ecx, dword [esi + 0x28]
mov ebp, dword [esi + 0x34]
mov edi, dword [esi + 0x30]
sub ebp, ecx
sub edi, eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], ebp
fst dword [esp + 0xc]
fmul dword [0x408268]
call sub.MSVCRT.dll__ftol
xor edx, edx
cmp eax, edx
jge 0x402a71
neg eax
mov cl, byte [esi + 8]
add eax, 0x96
test cl, cl
push ebx
mov cl, al
jne 0x402a9b
sub cl, 0x28
and eax, 0xff
and ecx, 0xff
or ch, 0x50
shl ecx, 8
or ecx, eax
mov dword [esi + 0x2c], ecx
jmp 0x402ab4
sub cl, 0x28
sub al, 0x14
xor ebx, ebx
and ecx, 0xff
mov bh, al
or ebx, ecx
shl ebx, 8
or ebx, ecx
mov dword [esi + 0x2c], ebx
fld dword [esi + 0x20]
fadd dword [esi + 0x1c]
fcom qword [esi + 0x10]
fst dword [esi + 0x1c]
fnstsw ax
test ah, 0x41
jne 0x402acf
fld qword [esi + 0x10]
fsubr st(1)
fstp dword [esi + 0x1c]
fstp st(0)
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 0x408234
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x38], edx
push eax
push 1
push edx
call dword [sym.imp.GDI32.dll_CreatePen]
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CGdiObject::Attach
mov ebx, dword [esp + 0x40]
lea edx, [esp + 0x18]
push edx
mov ecx, ebx
call sub.MFC42.DLL_CDC::SelectObject
fild dword [esi + 0x18]
mov dword [esp + 0x14], eax
fadd dword [0x408264]
fmul dword [esp + 0x10]
call sub.MSVCRT.dll__ftol
mov ecx, ebp
lea edx, [esp + 0x28]
sub ecx, eax
push ecx
push edi
push edx
mov ecx, ebx
call sub.MFC42.DLL_CDC::MoveTo
fild dword [esi + 0x18]
fadd dword [0x408260]
fmul dword [esp + 0x10]
call sub.MSVCRT.dll__ftol
add eax, ebp
mov ecx, ebx
push eax
push edi
call sub.MFC42.DLL_CDC::LineTo
mov ecx, dword [esi + 0x18]
mov eax, edi
sub eax, ecx
push ebp
dec eax
lea ecx, [esp + 0x2c]
push eax
push ecx
mov ecx, ebx
call sub.MFC42.DLL_CDC::MoveTo
mov edx, dword [esi + 0x18]
push ebp
mov ecx, ebx
lea eax, [edx + edi + 2]
push eax
call sub.MFC42.DLL_CDC::LineTo
mov ecx, dword [esi + 0x18]
mov dword [esp + 0x40], ecx
fild dword [esp + 0x40]
fadd dword [0x408264]
fmul dword [esp + 0x10]
call sub.MSVCRT.dll__ftol
mov ecx, dword [esp + 0x40]
mov edx, ebp
sub edx, eax
mov eax, edi
sub eax, ecx
push edx
dec eax
lea ecx, [esp + 0x2c]
push eax
push ecx
mov ecx, ebx
call sub.MFC42.DLL_CDC::MoveTo
mov edx, dword [esi + 0x18]
mov dword [esp + 0x40], edx
fild dword [esp + 0x40]
fadd dword [0x408260]
fmul dword [esp + 0x10]
call sub.MSVCRT.dll__ftol
add eax, ebp
push eax
mov eax, dword [esp + 0x44]
lea ecx, [eax + edi + 2]
push ecx
mov ecx, ebx
call sub.MFC42.DLL_CDC::LineTo
mov edx, dword [esi + 0x18]
mov dword [esp + 0x40], edx
fild dword [esp + 0x40]
fadd dword [0x408264]
fmul dword [esp + 0x10]
call sub.MSVCRT.dll__ftol
mov edx, dword [esp + 0x40]
mov ecx, ebp
sub ecx, eax
push ecx
lea eax, [edx + edi + 1]
lea ecx, [esp + 0x2c]
push eax
push ecx
mov ecx, ebx
call sub.MFC42.DLL_CDC::MoveTo
mov edx, dword [esi + 0x18]
mov dword [esp + 0x40], edx
fild dword [esp + 0x40]
fadd dword [0x408260]
fmul dword [esp + 0x10]
call sub.MSVCRT.dll__ftol
mov ecx, dword [esp + 0x40]
add eax, ebp
sub edi, ecx
push eax
sub edi, 2
mov ecx, ebx
push edi
call sub.MFC42.DLL_CDC::LineTo
mov eax, dword [esp + 0x14]
mov ecx, ebx
push eax
call sub.MFC42.DLL_CDC::SelectObject
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CGdiObject::DeleteObject
mov edi, dword [esp + 0x20]
dec ebp
push ebp
lea ecx, [esp + 0x4c]
push edi
push ecx
call dword [sym.imp.USER32.dll_PtInRect]
test eax, eax
pop ebx
je 0x402c88
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x44]
sub edx, eax
mov eax, dword [esp + 0x40]
imul edx, ebp
add edx, edi
lea ecx, [eax + edx*4]
mov eax, dword [eax + edx*4]
sub eax, 6
neg eax
sbb eax, eax
and eax, 2
mov dword [ecx], eax
xor eax, eax
xor ecx, ecx
mov dword [esi + 0x24], eax
mov dword [esi + 0x30], edi
mov dword [esi + 0x28], ecx
mov dword [esi + 0x34], ebp
mov byte [esi + 9], 1
mov dword [esp + 0x14], 0x408208
lea ecx, [esp + 0x14]
mov dword [esp + 0x34], 1
call sub.MFC42.DLL_CGdiObject::DeleteObject
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x2c
ret 0x18