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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4bc
mov eax, dword [0x4201a0]
xor eax, esp
mov dword [esp + 0x4b8], eax
push ebx
xor ebx, ebx
push esi
push edi
cmp dword [0x421504], ebx
je 0x401d3b
fldz
mov ecx, dword [0x4214e4]
fst qword [esp + 0x38]
lea eax, [esp + 0xc0]
fstp qword [esp + 0x40]
push eax
fld qword [0x41b250]
push ebx
fstp qword [esp + 0x78]
push 0xc4
fld qword [0x41b248]
push ecx
fstp qword [esp + 0x58]
mov dword [esp + 0x38], ebx
fld1
mov dword [esp + 0x3c], 2
fstp qword [esp + 0x68]
mov dword [esp + 0x40], 3
fld qword [0x41b238]
mov dword [esp + 0x90], 1
fstp qword [esp + 0x60]
mov dword [esp + 0x94], ebx
fld qword [0x41b230]
mov dword [esp + 0x70], ebx
fstp qword [esp + 0x88]
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0xd0], 0x400
call dword [sym.imp.USER32.dll_SendMessageA]
lea edi, [esp + 0xc0]
mov al, byte [edi]
test al, al
je 0x4013c0
jmp 0x4013b0
cmp al, 0x2d
je 0x4015f1
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4013b0
mov eax, dword [0x421504]
xor ecx, ecx
mov dword [esp + 0x1c], eax
mov edx, 8
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004095a6
add esp, 4
cmp dword [esp + 0x2c], 4
mov dword [esp + 0x20], eax
je 0x401d03
mov eax, dword [esp + 0x28]
cmp eax, 3
je 0x401782
cmp eax, 4
je 0x401782
fld qword [esp + 0x38]
fldz
fucompp
fnstsw ax
test ah, 0x44
jp 0x401420
fld qword [0x41b250]
fstp qword [esp + 0x38]
mov eax, dword [esp + 0x1c]
xor ecx, ecx
lea eax, [eax + eax*2]
mov edx, 0x10
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004095a6
mov esi, eax
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
mov dword [esp + 0x10], esi
neg ecx
or ecx, eax
push ecx
call fcn.004095a6
mov ecx, dword [0x421500]
mov dword [esp + 0x2c], eax
mov eax, dword [ecx]
add esp, 8
cmp eax, ecx
je 0x4014c8
xor edi, edi
lea ecx, [esi + 0x10]
mov dword [ecx - 0x10], 1
fld qword [eax + 8]
fstp qword [ecx - 8]
lea edx, [ecx - 0x10]
mov dword [ecx], 2
fld qword [eax + 0x10]
fstp qword [ecx + 8]
mov dword [ecx + 0x10], 0xffffffff
mov esi, dword [esp + 0x24]
mov dword [edi + esi], edx
movsx edx, byte [eax + 0x18]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x20]
add ecx, 0x30
fild dword [esp + 0x10]
add edi, 4
add ebx, 8
fstp qword [ebx + edx - 8]
mov eax, dword [eax]
cmp eax, dword [0x421500]
jne 0x401475
xor ebx, ebx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.00407c20
add esp, 8
xor esi, esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x90], 1
mov dword [esp + 0xa0], 2
mov dword [esp + 0xb0], 0xffffffff
mov dword [esp + 0x14], esi
fild dword [esp + 0x14]
xor edi, edi
mov dword [esp + 0x10], edi
fdiv qword [0x41b208]
fstp qword [esp + 0x88]
fld qword [esp + 0x88]
mov eax, dword [esp + 0x18]
fstp qword [esp + 0x98]
lea edx, [esp + 0x90]
fild dword [esp + 0x10]
push edx
push eax
fdiv qword [0x41b208]
fstp qword [esp + 0xb0]
call fcn.00403a70
add esp, 8
cmp dword [esp + 0x28], 2
jne 0x40156a
fldz
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40156a
fstp st(0)
fld qword [0x41b228]
call fcn.00409860
mov ecx, dword [eax*4 + section..data]
mov edx, dword [0x4214f4]
lea ebx, [eax*4 + section..data]
push ecx
push edi
push esi
push edx
call dword [sym.imp.GDI32.dll_SetPixel]
mov eax, dword [ebx]
mov ecx, dword [0x4214e8]
push eax
push edi
push esi
push ecx
call dword [sym.imp.GDI32.dll_SetPixel]
inc edi
mov dword [esp + 0x10], edi
cmp edi, 0x1f4
jl 0x40151c
inc esi
mov dword [esp + 0x14], esi
cmp esi, 0x1f4
jl 0x401505
lea edx, [esp + 0x18]
push edx
call fcn.00403b80
mov eax, dword [esp + 0x10]
push eax
call fcn.00409da8
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00409da8
mov edx, dword [esp + 0x2c]
push edx
call fcn.00409da8
add esp, 0x10
jmp 0x401d03
cmp byte [edi], bl
je 0x4013c0
movsx eax, byte [edi + 1]
sub eax, 0x62
add edi, 2
cmp eax, 0x15
ja case.0x401613.102
movzx edx, byte [eax + 0x401d88]
jmp dword [edx*4 + 0x401d50]
push edi
call fcn.00409d9d
add esp, 4
mov dword [esp + 0x28], eax
jmp case.0x401613.102
push edi
call fcn.00409d9d
add esp, 4
mov dword [esp + 0x2c], eax
jmp case.0x401613.102
push edi
call fcn.00409d9d
add esp, 4
mov dword [esp + 0x30], eax
jmp case.0x401613.102
push edi
call fcn.00409d74
fstp qword [esp + 0x3c]
add esp, 4
jmp case.0x401613.102
push edi
call fcn.00409d74
fstp qword [esp + 0x44]
add esp, 4
jmp case.0x401613.102
push edi
call fcn.00409d74
fstp qword [esp + 0x74]
add esp, 4
jmp case.0x401613.102
push edi
call fcn.00409d74
fstp qword [esp + 0x4c]
add esp, 4
jmp case.0x401613.102
push edi
call fcn.00409d74
fstp qword [esp + 0x5c]
add esp, 4
jmp case.0x401613.102
push edi
call fcn.00409d74
fstp qword [esp + 0x54]
add esp, 4
jmp case.0x401613.102
push edi
call fcn.00409d74
fstp qword [esp + 0x7c]
add esp, 4
jmp case.0x401613.102
push edi
call fcn.00409d9d
add esp, 4
mov dword [esp + 0x80], eax
jmp case.0x401613.102
push edi
call fcn.00409d9d
add esp, 4
mov dword [esp + 0x84], eax
jmp case.0x401613.102
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
inc eax
mov dword [esp + 0x60], eax
add eax, eax
add eax, eax
push eax
push ecx
call fcn.00409c1c
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x6c], eax
lea eax, [edx*8]
push eax
push ecx
call fcn.00409c1c
push edi
mov dword [esp + 0x7c], eax
call fcn.00409d9d
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
mov dword [edx + ecx*4 - 4], eax
mov al, byte [edi]
add esp, 0x14
test al, al
je 0x401768
lea esp, [esp]
movsx edx, al
push edx
call fcn.00409bee
add esp, 4
test eax, eax
jne 0x401768
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401750
push edi
call fcn.00409d74
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x64]
fstp qword [eax + ecx*8 - 8]
add esp, 4
jmp case.0x401613.102
fld qword [esp + 0x38]
fldz
fucompp
fnstsw ax
test ah, 0x44
jp 0x401797
fld1
fstp qword [esp + 0x38]
mov eax, dword [esp + 0x1c]
xor ecx, ecx
add eax, eax
mov edx, 0x10
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004095a6
mov esi, eax
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
mov dword [esp + 0x8c], esi
neg ecx
or ecx, eax
push ecx
call fcn.004095a6
mov ecx, dword [0x421500]
mov dword [esp + 0x2c], eax
mov eax, dword [ecx]
add esp, 8
or ebx, 0xffffffff
cmp eax, ecx
je 0x401825
xor edi, edi
xor edx, edx
mov ecx, esi
mov dword [ecx], 1
fld qword [eax + 8]
fstp qword [ecx + 8]
mov dword [ecx + 0x10], ebx
mov esi, dword [esp + 0x24]
mov dword [edx + esi], ecx
fld qword [eax + 0x10]
mov esi, dword [esp + 0x20]
fstp qword [edi + esi]
mov eax, dword [eax]
add ecx, 0x20
add edx, 4
add edi, 8
cmp eax, dword [0x421500]
jne 0x4017f2
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.00407c20
push 0x7d0
mov dword [esp + 0x24], eax
mov dword [esp + 0x9c], 1
mov dword [esp + 0xac], ebx
call fcn.004095a6
fld qword [0x41b208]
add esp, 0xc
xor edi, edi
mov ebx, eax
mov dword [esp + 0x14], edi
fidivr dword [esp + 0x14]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x90]
push edx
push eax
fstp qword [esp + 0xa0]
call fcn.00403a70
fld qword [0x41b208]
fmul st(1), st(0)
add esp, 8
fxch st(1)
call fcn.00409860
mov dword [ebx + edi*4], eax
inc edi
mov dword [esp + 0x14], edi
cmp edi, 0x1f4
jl 0x401865
mov ecx, dword [section..data]
fstp st(0)
push ecx
push 0
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov edx, dword [0x4214e8]
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
mov esi, eax
push esi
push edx
call edi
push 0
push 0
mov dword [esp + 0x14], eax
mov eax, dword [0x4214e8]
push 0
push eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov ecx, dword [0x4214e8]
push 0x1f4
push 0
push ecx
call dword [sym.imp.GDI32.dll_LineTo]
mov edx, dword [esp + 0xc]
mov eax, dword [0x4214e8]
push edx
push eax
call edi
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [section..data]
push ecx
push 0
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov edx, dword [0x4214f4]
mov esi, eax
push esi
push edx
call edi
push 0
push 0
mov dword [esp + 0x14], eax
mov eax, dword [0x4214f4]
push 0
push eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov ecx, dword [0x4214f4]
push 0x1f4
push 0
push ecx
call dword [sym.imp.GDI32.dll_LineTo]
mov edx, dword [esp + 0xc]
mov eax, dword [0x4214f4]
push edx
push eax
call edi
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
fld qword [esp + 0x78]
fmul qword [0x41b208]
call fcn.00409860
mov dword [esp + 0x14], eax
mov esi, 1
lea ebx, [ebx]
mov ecx, dword [section..data]
push ecx
push 0
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov edx, dword [0x4214e8]
push eax
push edx
mov dword [esp + 0x18], eax
call edi
push 0
push 0
mov dword [esp + 0x14], eax
mov eax, dword [0x4214e8]
push esi
push eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov ecx, dword [0x4214e8]
push 0x1f4
push esi
push ecx
call dword [sym.imp.GDI32.dll_LineTo]
mov edx, dword [esp + 0xc]
mov eax, dword [0x4214e8]
push edx
push eax
call edi
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [section..data]
push edx
push 0
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
push eax
mov dword [esp + 0x14], eax
mov eax, dword [0x4214f4]
push eax
call edi
mov ecx, dword [0x4214f4]
push 0
push 0
push esi
push ecx
mov dword [esp + 0x1c], eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov edx, dword [0x4214f4]
push 0x1f4
push esi
push edx
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0xc]
mov ecx, dword [0x4214f4]
push eax
push ecx
call edi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [0x420014]
push eax
push 0
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov ecx, dword [0x4214e8]
push eax
push ecx
mov dword [esp + 0x18], eax
call edi
mov edx, dword [ebx + esi*4 - 4]
push 0
mov dword [esp + 0x10], eax
push edx
lea eax, [esi - 1]
push eax
mov eax, dword [0x4214e8]
push eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov ecx, dword [ebx + esi*4]
push ecx
mov edx, dword [0x4214e8]
push esi
push edx
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0xc]
mov ecx, dword [0x4214e8]
push eax
push ecx
call edi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [0x420014]
push eax
push 0
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov ecx, dword [0x4214f4]
push eax
push ecx
mov dword [esp + 0x18], eax
call edi
mov edx, dword [ebx + esi*4 - 4]
push 0
mov dword [esp + 0x10], eax
push edx
lea eax, [esi - 1]
push eax
mov eax, dword [0x4214f4]
push eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov ecx, dword [ebx + esi*4]
mov edx, dword [0x4214f4]
push ecx
push esi
push edx
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0xc]
mov ecx, dword [0x4214f4]
push eax
push ecx
call edi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp dword [esp + 0x28], 3
jne 0x401cc2
mov eax, dword [0x420008]
push eax
push 0
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov ecx, dword [0x4214e8]
push eax
push ecx
mov dword [esp + 0x18], eax
call edi
mov edx, dword [ebx + esi*4 - 4]
add edx, dword [esp + 0x14]
push 0
mov dword [esp + 0x10], eax
push edx
lea eax, [esi - 1]
push eax
mov eax, dword [0x4214e8]
push eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov ecx, dword [ebx + esi*4]
add ecx, dword [esp + 0x14]
mov edx, dword [0x4214e8]
push ecx
push esi
push edx
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0xc]
mov ecx, dword [0x4214e8]
push eax
push ecx
call edi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [0x420008]
push eax
push 0
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov ecx, dword [0x4214f4]
push eax
push ecx
mov dword [esp + 0x18], eax
call edi
mov edx, dword [ebx + esi*4 - 4]
add edx, dword [esp + 0x14]
push 0
mov dword [esp + 0x10], eax
push edx
lea eax, [esi - 1]
push eax
mov eax, dword [0x4214f4]
push eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov ecx, dword [ebx + esi*4]
add ecx, dword [esp + 0x14]
mov edx, dword [0x4214f4]
push ecx
push esi
push edx
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0xc]
mov ecx, dword [0x4214f4]
push eax
push ecx
call edi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [0x420008]
push eax
push 0
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov ecx, dword [0x4214e8]
push eax
push ecx
mov dword [esp + 0x18], eax
call edi
mov dword [esp + 0xc], eax
mov edx, dword [ebx + esi*4 - 4]
sub edx, dword [esp + 0x14]
push 0
push edx
lea eax, [esi - 1]
push eax
mov eax, dword [0x4214e8]
push eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov ecx, dword [ebx + esi*4]
sub ecx, dword [esp + 0x14]
mov edx, dword [0x4214e8]
push ecx
push esi
push edx
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0xc]
mov ecx, dword [0x4214e8]
push eax
push ecx
call edi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [0x420008]
push eax
push 0
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov ecx, dword [0x4214f4]
push eax
push ecx
mov dword [esp + 0x18], eax
call edi
mov edx, dword [ebx + esi*4 - 4]
sub edx, dword [esp + 0x14]
push 0
mov dword [esp + 0x10], eax
push edx
lea eax, [esi - 1]
push eax
mov eax, dword [0x4214f4]
push eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov ecx, dword [ebx + esi*4]
sub ecx, dword [esp + 0x14]
mov edx, dword [0x4214f4]
push ecx
push esi
push edx
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0xc]
mov ecx, dword [0x4214f4]
push eax
push ecx
call edi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
inc esi
cmp esi, 0x1f4
jl 0x401980
lea eax, [esp + 0x18]
push eax
call fcn.00403b80
push ebx
call fcn.00409da8
mov ecx, dword [esp + 0x90]
push ecx
call fcn.00409da8
mov edx, dword [esp + 0x30]
push edx
call fcn.00409da8
mov eax, dword [esp + 0x30]
push eax
call fcn.00409da8
add esp, 0x14
mov ecx, dword [esp + 0x64]
push ecx
call fcn.004099d7
mov edx, dword [esp + 0x6c]
push edx
call fcn.004099d7
mov eax, dword [0x421500]
mov esi, dword [eax]
add esp, 8
cmp esi, eax
je 0x401d3b
lea eax, [esi + 8]
push eax
call fcn.004010b0
mov esi, dword [esi]
add esp, 4
cmp esi, dword [0x421500]
jne 0x401d25
mov ecx, dword [esp + 0x4c4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00409843
mov esp, ebp
pop ebp
ret