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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4a4
mov eax, dword [0x446b0c]
xor eax, esp
mov dword [esp + 0x4a0], eax
mov eax, dword [ebp + 0x1c]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push eax
push edi
mov esi, ecx
mov dword [esp + 0x18], edi
call dword [sym.imp.GDI32.dll_SelectObject]
lea eax, [esp + 0x98]
push eax
push dword [esi + 0x82d28]
call dword [sym.imp.USER32.dll_GetWindowRect]
push 8
call dword [sym.imp.USER32.dll_GetSystemMetrics]
add dword [esp + 0x98], eax
mov eax, dword [ebp + 0x14]
sub eax, dword [ebp + 0xc]
cmp eax, 0x780
mov dword [esi + 0x1095648], eax
jle 0x40d8e9
push 0
push edi
call dword [sym.imp.GDI32.dll_SetTextColor]
lea eax, [esp + 0x90]
push eax
push 4
push str.Plot
push edi
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
mov eax, dword [esi + 0x83544]
and dword [esp + 0x18], 0
imul eax, eax, 5
test eax, eax
jl 0x40d986
mov eax, dword [ebp + 0x18]
and dword [esp + 0x14], 0
sub eax, dword [ebp + 0x10]
mov dword [esp + 0x2c], eax
mov ecx, dword [esi + 0x83544]
mov eax, dword [esp + 0x14]
imul ecx, ecx, 5
cdq
idiv ecx
mov ebx, dword [sym.imp.GDI32.dll_MoveToEx]
push 0
mov edi, eax
add edi, dword [ebp + 0x10]
push edi
push dword [ebp + 0xc]
push dword [esp + 0x1c]
call ebx
push edi
push dword [ebp + 0x14]
push dword [esp + 0x18]
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0x18]
push 5
cdq
pop ecx
idiv ecx
test edx, edx
jne 0x40d96b
push edx
inc edi
push edi
push dword [ebp + 0xc]
push dword [esp + 0x1c]
call ebx
push edi
push dword [ebp + 0x14]
push dword [esp + 0x18]
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0x2c]
add dword [esp + 0x14], eax
mov eax, dword [esi + 0x83544]
inc dword [esp + 0x18]
imul eax, eax, 5
cmp dword [esp + 0x18], eax
jle 0x40d90e
push 1
push dword [esp + 0x14]
call dword [sym.imp.GDI32.dll_SetBkMode]
cmp dword [esi + 0x1097600], 1
jne 0x40d9a1
xor ecx, ecx
xor edx, edx
jmp 0x40d9ad
mov ecx, dword [esi + 0x1095eb0]
mov edx, dword [esi + 0x1095eb4]
fld qword [esi + 0x83568]
lea eax, [esi + 0x1095eb8]
fld qword [0x441718]
mov dword [eax], ecx
mov ecx, dword [esi + 0x10cc078]
fmul st(1), st(0)
mov dword [eax + 4], edx
fld dword [ecx + 0x4ff0]
mov edi, dword [eax]
fdivp st(2)
mov ebx, edx
fxch st(1)
call fcn.004248d6
fmul qword [esi + 0x83570]
mov ecx, edi
sub ecx, eax
mov eax, ebx
sbb eax, edx
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0x10cc078]
fdiv dword [eax + 0x4ff0]
mov dword [esp + 0x38], ecx
call fcn.004248d6
mov ecx, dword [esi + 0x1095694]
sub edi, eax
mov eax, dword [esi + 0x83540]
sbb ebx, edx
sub ecx, dword [esi + 0x83558]
cdq
push edx
push eax
push dword [esi + ecx*8 + 0x109569c]
mov dword [esp + 0x5c], edi
push dword [esi + ecx*8 + 0x1095698]
mov dword [esp + 0x64], ebx
call fcn.00424990
push edx
push eax
push dword [esp + 0x44]
mov dword [esp + 0x3c], eax
push dword [esp + 0x44]
mov dword [esp + 0x44], edx
call fcn.00424990
push dword [esp + 0x34]
push dword [esp + 0x34]
push edx
push eax
call fcn.00424950
fild qword [esp + 0x30]
mov edi, eax
mov ebx, edx
fstp qword [esp + 0x80]
mov dword [esp + 0x20], edi
fld qword [esp + 0x80]
mov dword [esp + 0x24], ebx
fdiv qword [0x441798]
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], ebx
call fcn.004248d6
mov dword [esp + 0x58], eax
mov eax, edi
sub eax, dword [esp + 0x58]
mov edi, ebx
sbb edi, edx
cmp ebx, dword [esp + 0x3c]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], eax
jg 0x40dac9
jl 0x40dab9
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x38]
jae 0x40dac9
mov eax, dword [esp + 0x30]
add dword [esp + 0x20], eax
adc ebx, dword [esp + 0x34]
mov dword [esp + 0x24], ebx
mov ecx, dword [esi + 0x824f8]
and dword [esp + 0x44], 0
cmp ecx, dword [esi + 0x82500]
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], ecx
jg 0x40de84
mov eax, dword [esp + 0x50]
sub eax, dword [esp + 0x38]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x54]
sbb eax, dword [esp + 0x3c]
mov dword [esp + 0x6c], eax
lea eax, [ecx + 1]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x14]
sub eax, ecx
mov dword [esp + 0x2c], eax
or eax, 0xffffffff
sub eax, dword [ebp + 0xc]
mov dword [esp + 0x70], eax
jmp 0x40db24
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x14]
push dword [esp + 0x6c]
add eax, ecx
push dword [esp + 0x6c]
mov dword [esp + 0x7c], eax
cdq
push edx
push eax
call fcn.00424950
mov ecx, eax
mov eax, dword [esi + 0x82500]
sub eax, dword [esi + 0x824f8]
mov ebx, edx
cdq
push edx
push eax
push ebx
push ecx
call fcn.00424990
add eax, dword [esp + 0x38]
mov ebx, edx
adc ebx, dword [esp + 0x3c]
mov dword [esp + 0x90], eax
cmp ebx, edi
jl 0x40dbe6
jg 0x40db75
cmp eax, dword [esp + 0x60]
jb 0x40dbe6
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
fild dword [esp + 0x18]
test eax, eax
jge 0x40db8b
fadd qword [0x4416b8]
fmul qword [esp + 0x80]
fdiv qword [0x441798]
call fcn.004248d6
mov ecx, dword [esp + 0x48]
mov edi, dword [esp + 0x4c]
sub ecx, eax
sbb edi, edx
cmp dword [esp + 0x74], 2
mov dword [esp + 0x60], ecx
jle 0x40dbe6
cmp dword [esp + 0x2c], 2
jle 0x40dbe6
cmp dword [esp + 0x18], 0xa
je 0x40dbe6
push 0
push dword [ebp + 0x10]
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.GDI32.dll_MoveToEx]
push dword [ebp + 0x18]
push dword [esp + 0x18]
push dword [esp + 0x18]
call dword [sym.imp.GDI32.dll_LineTo]
cmp ebx, dword [esp + 0x24]
jl 0x40de68
mov ebx, dword [esp + 0x20]
jg 0x40dc03
cmp dword [esp + 0x90], ebx
jb 0x40de68
mov edi, dword [sym.imp.GDI32.dll_MoveToEx]
push 0
push dword [ebp + 0x10]
push dword [esp + 0x24]
push dword [esp + 0x1c]
call edi
push dword [ebp + 0x18]
push dword [esp + 0x20]
push dword [esp + 0x18]
call dword [sym.imp.GDI32.dll_LineTo]
push 0
push dword [ebp + 0x10]
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call edi
push dword [ebp + 0x18]
push dword [esp + 0x18]
push dword [esp + 0x18]
call dword [sym.imp.GDI32.dll_LineTo]
push dword [esp + 0x24]
mov eax, esi
push ebx
call fcn.0040e06d
lea edi, [esi + 0x10966f8]
push edi
call fcn.00420000
pop ecx
inc eax
push eax
lea eax, [esi + 0x10967f8]
push eax
push 0xffffffffffffffff
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esi + 0x10967f8]
push eax
lea eax, [esp + 0xac]
push 0x1ff
push eax
call fcn.0042074b
add esp, 0xc
push dword [esp + 0x24]
mov eax, esi
push ebx
call fcn.0040df40
push edi
call fcn.00420000
pop ecx
inc eax
push eax
lea eax, [esi + 0x10967f8]
push eax
push 0xffffffffffffffff
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esi + 0x10967f8]
push eax
lea eax, [esp + 0x2ac]
push 0x1ff
push eax
call fcn.0042074b
mov edi, dword [esp + 0x30]
add esp, 0xc
mov eax, ebx
sub eax, dword [esp + 0x58]
mov dword [esp + 0x4c], edi
sbb edi, dword [esp + 0x5c]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x48], ebx
add ebx, dword [esp + 0x30]
mov dword [esp + 0x18], 1
adc dword [esp + 0x24], eax
lea eax, [esp + 0x88]
push eax
mov dword [esp + 0x24], ebx
lea eax, [esp + 0xac]
push eax
call fcn.00420223
mov ebx, dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
pop ecx
push eax
lea eax, [esp + 0xb0]
push eax
push dword [esp + 0x1c]
call ebx
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0x2ac]
push eax
call fcn.00420223
pop ecx
push eax
lea eax, [esp + 0x2b0]
push eax
push dword [esp + 0x1c]
call ebx
mov ebx, dword [esp + 0x1c]
cmp ebx, dword [esi + 0x824f8]
jl 0x40de68
cmp ebx, dword [esi + 0x82500]
jg 0x40de68
push 0x10
call dword [sym.imp.USER32.dll_GetSystemMetrics]
cdq
sub eax, edx
sar eax, 1
cmp dword [esi + 0x1095648], eax
jge 0x40dd9b
mov eax, dword [esp + 0x44]
and al, 1
inc dword [esp + 0x44]
test al, al
jne 0x40de68
mov eax, dword [esp + 0x88]
mov ecx, dword [esi + 0x824f8]
cdq
sub eax, edx
mov edx, dword [esp + 0x1c]
sar eax, 1
sub edx, eax
cmp edx, ecx
jge 0x40ddba
lea ebx, [eax + ecx]
mov ecx, dword [esi + 0x82500]
lea edx, [eax + ebx]
cmp edx, ecx
jle 0x40ddcb
sub ecx, eax
mov ebx, ecx
lea eax, [esp + 0xa8]
push eax
call fcn.00420223
pop ecx
push eax
lea eax, [esp + 0xac]
push eax
mov eax, dword [esp + 0x90]
push dword [ebp + 0x18]
cdq
sub eax, edx
sar eax, 1
sub ebx, eax
push ebx
push dword [esp + 0x20]
call dword [sym.imp.GDI32.dll_TextOutW]
mov eax, dword [esp + 0x78]
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esi + 0x824f8]
cdq
sub eax, edx
sar eax, 1
mov edx, ebx
sub edx, eax
cmp edx, ecx
jge 0x40de1c
lea ebx, [eax + ecx]
mov ecx, dword [esi + 0x82500]
lea edx, [eax + ebx]
cmp edx, ecx
jle 0x40de2d
sub ecx, eax
mov ebx, ecx
lea eax, [esp + 0x2a8]
push eax
call fcn.00420223
pop ecx
push eax
lea eax, [esp + 0x2ac]
push eax
mov eax, dword [ebp + 0x10]
sub eax, dword [esp + 0x84]
push eax
mov eax, dword [esp + 0x84]
cdq
sub eax, edx
sar eax, 1
sub ebx, eax
push ebx
push dword [esp + 0x20]
call dword [sym.imp.GDI32.dll_TextOutW]
inc dword [esp + 0x1c]
dec dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
inc dword [esp + 0x14]
cmp eax, dword [esi + 0x82500]
jle 0x40db20
mov edi, dword [sym.imp.GDI32.dll_MoveToEx]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0x14]
push dword [esp + 0x1c]
call edi
push dword [ebp + 0x18]
mov ebx, dword [sym.imp.GDI32.dll_LineTo]
push dword [ebp + 0x14]
push dword [esp + 0x18]
call ebx
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esp + 0x1c]
call edi
push dword [ebp + 0x18]
push dword [ebp + 0xc]
push dword [esp + 0x18]
call ebx
fld qword [esi + 0x83578]
fmul qword [0x4416a8]
fdiv qword [esi + 0x1094e48]
call fcn.004248a0
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push eax
push 0
mov ebx, 0x400
push ebx
push dword [esi + 0x82d28]
call edi
lea eax, [esi + 0x83538]
fld qword [eax]
fsub qword [esi + 0x84588]
fmul qword [0x4416a8]
fdiv qword [eax]
call fcn.004248a0
push eax
push 1
push ebx
push dword [esi + 0x82d28]
call edi
mov ecx, dword [esp + 0x4ac]
lea edi, [esi + 0x1094e14]
lea esi, [ebp + 0xc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
pop esi
xor eax, eax
pop ebx
xor ecx, esp
inc eax
call fcn.0041fba2
mov esp, ebp
pop ebp
ret 0x18