Function at 0x40fe00
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x583c0c
mov eax, dword fs:[0]
push eax
sub esp, 0x170
mov eax, dword [0x5ebe74]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [ebp + 8]
mov ecx, ebx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x16c], eax
push 0
mov eax, dword [ebx]
mov dword [ebp - 0x140], ebx
call dword [eax + 0x24]
mov edx, dword [ebx]
mov ecx, ebx
push 8
mov dword [ebp - 0x170], eax
call dword [edx + 0x24]
push dword [edi + 0xc]
mov dword [ebp - 0x174], eax
push dword [edi + 8]
push dword [edi + 4]
push dword [edi]
push dword [ebx + 4]
call dword [sym.imp.GDI32.dll_Rectangle]
mov eax, dword [edi]
mov ecx, ebx
add eax, 0x41
mov dword [edi + 0x10], eax
mov eax, dword [edi + 4]
add eax, 0xa
mov dword [edi + 0x14], eax
mov eax, dword [edi + 8]
sub eax, 0xa
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0xc]
sub eax, 0x2d
push 1
mov dword [edi + 0x1c], eax
call fcn.00419f60
push 0xa
mov ecx, ebx
call fcn.0041a060
mov eax, dword [ebx]
mov ecx, ebx
push 0
call dword [eax + 0x30]
mov dword [ebp - 0x154], 0
mov dword [ebp - method.CPen.virtual_0], vtable.CPen.0
push 0x808080
push 1
mov dword [ebp - 4], 0
mov esi, dword [sym.imp.GDI32.dll_CreatePen]
push 2
call esi
push eax
lea ecx, [ebp - 0x158]
call fcn.00419637
mov dword [ebp - 0x164], 0
mov dword [ebp - method.CPen.virtual_0], vtable.CPen.0
push 0xe1e1e1
push 1
push 2
mov byte [ebp - 4], 1
call esi
push eax
lea ecx, [ebp - 0x168]
call fcn.00419637
mov dword [ebp - 0x14c], 0
mov dword [ebp - method.CPen.virtual_0], vtable.CPen.0
push 0x808080
push 1
push 0
mov byte [ebp - 4], 2
call esi
push eax
lea ecx, [ebp - 0x150]
call fcn.00419637
movsd xmm1, qword [edi + 0x48]
movsd xmm0, qword [edi + 0x50]
movsd xmm2, qword [0x5cbca0]
movsd qword [ebp - 0x13c], xmm1
addsd xmm0, xmm2
comisd xmm0, xmm1
jb 0x410113
comisd xmm1, xmmword [0x5cbde8]
jbe 0x40ff93
comisd xmm2, xmm1
jbe 0x40ff93
xorps xmm0, xmm0
lea eax, [ebp - 0x150]
movsd qword [ebp - 0x13c], xmm0
jmp 0x40ff99
lea eax, [ebp - 0x158]
push eax
mov ecx, ebx
call fcn.00419e64
movsd xmm4, qword [edi + 0x48]
movsd xmm2, qword [ebp - 0x13c]
comisd xmm2, xmm4
jbe 0x41006d
movsd xmm3, qword [edi + 0x50]
movaps xmm0, xmm3
subsd xmm0, qword [0x5cbca0]
comisd xmm0, xmm2
jbe 0x41006d
mov ecx, dword [edi + 0x1c]
subsd xmm3, xmm4
mov eax, dword [edi + 0x14]
movaps xmm0, xmm2
sub eax, ecx
subsd xmm0, xmm4
movd xmm1, eax
cvtdq2pd xmm1, xmm1
divsd xmm1, xmm3
mulsd xmm1, xmm0
movd xmm0, ecx
mov ecx, ebx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cvttsd2si eax, xmm1
push eax
mov eax, dword [edi + 0x10]
sub eax, 2
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00419b00
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x14]
movsd xmm0, qword [edi + 0x50]
sub eax, ecx
subsd xmm0, qword [edi + 0x48]
movd xmm2, eax
cvtdq2pd xmm2, xmm2
divsd xmm2, xmm0
movsd xmm0, qword [ebp - 0x13c]
subsd xmm0, qword [edi + 0x48]
mulsd xmm2, xmm0
movd xmm0, ecx
mov ecx, ebx
cvtdq2pd xmm0, xmm0
addsd xmm2, xmm0
cvttsd2si eax, xmm2
push eax
push dword [edi + 0x18]
call fcn.00419acb
movsd xmm2, qword [ebp - 0x13c]
lea ecx, [ebp - 0x110]
call fcn.00409550
lea esi, [ebp - 0x110]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x410081
movsd xmm0, qword [edi + 0x50]
lea eax, [ebp - 0x110]
subsd xmm0, qword [edi + 0x48]
sub esi, ecx
mov edx, dword [ebx]
mov ecx, dword [edi + 0x1c]
push esi
push eax
mov eax, dword [edi + 0x14]
sub eax, ecx
movd xmm1, eax
cvtdq2pd xmm1, xmm1
divsd xmm1, xmm0
movsd xmm0, qword [ebp - 0x13c]
subsd xmm0, qword [edi + 0x48]
mulsd xmm1, xmm0
movd xmm0, ecx
mov ecx, ebx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cvttsd2si eax, xmm1
add eax, 8
push eax
mov eax, dword [edi + 0x10]
sub eax, 5
push eax
call dword [edx + 0x5c]
movsd xmm1, qword [ebp - 0x13c]
movsd xmm0, qword [edi + 0x50]
movsd xmm2, qword [0x5cbca0]
addsd xmm1, qword [edi + 0x40]
addsd xmm0, xmm2
movsd qword [ebp - 0x13c], xmm1
comisd xmm0, xmm1
jae 0x40ff70
push 6
mov ecx, ebx
call fcn.0041a060
mov eax, dword [ebx]
mov ecx, ebx
push 0
call dword [eax + 0x30]
mov eax, dword [edi + 0x2c]
mov dword [ebp - 0x134], eax
cmp eax, dword [edi + 0x30]
jg 0x410528
mov esi, 5
nop dword [eax]
lea eax, [ebp - 0x150]
mov ecx, ebx
push eax
call fcn.00419e64
mov edx, dword [edi + 0x10]
mov ecx, ebx
mov eax, dword [edi + 0x18]
sub eax, edx
push dword [edi + 0x1c]
movd xmm1, eax
mov eax, dword [edi + 0x30]
sub eax, dword [edi + 0x2c]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mov eax, dword [ebp - 0x134]
sub eax, dword [edi + 0x2c]
divsd xmm1, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cvttsd2si eax, xmm1
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00419b00
mov ecx, dword [ebp - 0x134]
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [edi + 0x10]
lea eax, [eax + eax*4]
add eax, eax
sub ecx, eax
mov eax, 2
mov dword [ebp - 0x138], ecx
mov ecx, ebx
cmove eax, esi
add eax, dword [edi + 0x1c]
push eax
mov eax, dword [edi + 0x18]
sub eax, edx
movd xmm1, eax
mov eax, dword [edi + 0x30]
sub eax, dword [edi + 0x2c]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mov eax, dword [ebp - 0x134]
sub eax, dword [edi + 0x2c]
divsd xmm1, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cvttsd2si eax, xmm1
push eax
call fcn.00419acb
mov esi, dword [edi + 0x28]
cmp esi, 5
jl 0x4102e1
cmp esi, 0xa
jge 0x41024b
mov ecx, dword [ebp - 0x134]
test cl, 1
je 0x4102e1
jmp 0x4103a9
cmp esi, 0x19
jge 0x410272
mov ecx, dword [ebp - 0x134]
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*4]
sub ecx, eax
je 0x4102e1
jmp 0x4103a3
cmp esi, 0x32
jge 0x410285
cmp dword [ebp - 0x138], 0
je 0x4102e1
cmp esi, 0x32
jl 0x4102af
cmp esi, 0x64
jge 0x4102b8
mov eax, 0x66666667
imul dword [ebp - 0x134]
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*4]
mov eax, dword [ebp - 0x134]
shl ecx, 2
sub eax, ecx
je 0x4102e1
cmp esi, 0x64
jl 0x4103a3
mov eax, 0x66666667
imul dword [ebp - 0x134]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*4]
mov eax, dword [ebp - 0x134]
shl ecx, 3
sub eax, ecx
jne 0x4103a3
lea eax, [ebp - 0x168]
mov ecx, ebx
push eax
call fcn.00419e64
mov eax, dword [edi + 0x1c]
mov ecx, ebx
mov edx, dword [edi + 0x10]
sub eax, 2
push eax
mov eax, dword [edi + 0x18]
sub eax, edx
movd xmm1, eax
mov eax, dword [edi + 0x30]
sub eax, dword [edi + 0x2c]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mov eax, dword [ebp - 0x134]
sub eax, dword [edi + 0x2c]
divsd xmm1, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cvttsd2si eax, xmm1
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.00419b00
mov eax, dword [edi + 0x14]
mov ecx, ebx
mov edx, dword [edi + 0x10]
inc eax
push eax
mov eax, dword [edi + 0x18]
sub eax, edx
movd xmm1, eax
mov eax, dword [edi + 0x30]
sub eax, dword [edi + 0x2c]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mov eax, dword [ebp - 0x134]
sub eax, dword [edi + 0x2c]
divsd xmm1, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cvttsd2si eax, xmm1
push eax
call fcn.00419acb
mov esi, dword [edi + 0x28]
mov ecx, dword [ebp - 0x134]
mov eax, ecx
cdq
idiv esi
test edx, edx
jne 0x41050d
lea eax, [ebp - 0x158]
mov ecx, ebx
push eax
call fcn.00419e64
mov eax, dword [edi + 0x1c]
mov ecx, ebx
mov edx, dword [edi + 0x10]
sub eax, 2
push eax
mov eax, dword [edi + 0x18]
sub eax, edx
movd xmm1, eax
mov eax, dword [edi + 0x30]
sub eax, dword [edi + 0x2c]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mov eax, dword [ebp - 0x134]
sub eax, dword [edi + 0x2c]
divsd xmm1, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cvttsd2si eax, xmm1
push eax
lea eax, [ebp - 0x17c]
push eax
call fcn.00419b00
mov eax, dword [edi + 0x14]
mov ecx, ebx
mov edx, dword [edi + 0x10]
inc eax
push eax
mov eax, dword [edi + 0x18]
sub eax, edx
movd xmm1, eax
mov eax, dword [edi + 0x30]
sub eax, dword [edi + 0x2c]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mov eax, dword [ebp - 0x134]
sub eax, dword [edi + 0x2c]
divsd xmm1, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cvttsd2si eax, xmm1
push eax
call fcn.00419acb
movd xmm0, dword [ebp - 0x134]
lea ecx, [ebp - 0x110]
cvtdq2pd xmm2, xmm0
mulsd xmm2, qword [edi + 0x38]
call fcn.00409550
lea ecx, [ebp - 0x110]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4104a0
sub ecx, edx
mov esi, dword [ebx]
mov edx, dword [edi + 0x10]
lea eax, [ebp - 0x110]
push ecx
push eax
mov eax, dword [edi + 0x1c]
add eax, 5
mov dword [ebp - 0x138], ecx
push eax
mov eax, dword [edi + 0x18]
mov ecx, ebx
sub eax, edx
movd xmm1, eax
mov eax, dword [edi + 0x30]
sub eax, dword [edi + 0x2c]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mov eax, dword [ebp - 0x134]
sub eax, dword [edi + 0x2c]
divsd xmm1, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cvttsd2si eax, xmm1
push eax
call dword [esi + 0x5c]
mov eax, dword [ebp - 0x134]
mov esi, 5
inc eax
mov dword [ebp - 0x134], eax
cmp eax, dword [edi + 0x30]
jle 0x410140
cmp dword [ebp + 0x10], 0
je 0x410770
push 2
mov ecx, ebx
call fcn.0041a060
lea esi, [edi + 0x68]
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x410543
mov eax, dword [edi + 0x1c]
sub ecx, edx
mov edx, dword [ebx]
add eax, 0x16
push ecx
push esi
push eax
push dword [edi + 0x18]
mov ecx, ebx
call dword [edx + 0x5c]
push 0
mov ecx, ebx
call fcn.0041a060
lea esi, [edi + 0x468]
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x410573
mov eax, dword [edi + 0x1c]
sub ecx, edx
mov edx, dword [ebx]
add eax, 0x16
push ecx
push esi
push eax
push dword [edi + 0x10]
mov ecx, ebx
call dword [edx + 0x5c]
mov eax, dword [edi + 0x10]
mov esi, dword [edi + 0x14]
mov edx, dword [edi + 0x18]
inc esi
mov ecx, dword [edi + 0x1c]
inc edx
mov dword [ebp - 0x130], eax
lea eax, [ebp - 0x130]
mov dword [ebp - 0x12c], ecx
mov ecx, ebx
push eax
mov dword [ebp - 0x128], edx
mov dword [ebp - 0x124], esi
call fcn.00419a15
lea eax, [edi + 0x468]
mov dword [ebp - 0x120], 0xff
push eax
lea eax, [ebp - 0x120]
mov dword [ebp - 0x11c], 0x8000
push eax
mov dword [ebp - 0x118], 0xff0000
mov dword [ebp - 0x114], 0x7f7f7f
call fcn.00410d20
xor eax, eax
mov dword [ebp - 0x134], eax
cmp dword [edi + 0x20], eax
jle 0x410770
nop
mov dword [ebp - 0x144], 0
mov dword [ebp - method.CPen.virtual_0], vtable.CPen.0
mov byte [ebp - 4], 3
push dword [ebp + eax*4 - 0x120]
push 1
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
push eax
lea ecx, [ebp - 0x148]
call fcn.00419637
lea eax, [ebp - 0x148]
mov ecx, ebx
push eax
call fcn.00419e64
mov eax, dword [edi + 0x30]
mov ebx, dword [edi + 0x2c]
mov dword [ebp - 0x138], eax
cmp ebx, eax
jg 0x41073f
nop word [eax + eax]
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x14]
movsd xmm0, qword [edi + 0x50]
sub eax, ecx
subsd xmm0, qword [edi + 0x48]
mov esi, dword [ebp - 0x16c]
mov edx, dword [edi + 0x10]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
mov eax, dword [edi + 0x24]
imul eax, dword [ebp - 0x134]
divsd xmm1, xmm0
add eax, ebx
movd xmm0, dword [esi + eax*4]
cvtdq2pd xmm0, xmm0
mov eax, dword [edi + 0x18]
mov esi, dword [edi + 0x2c]
sub eax, edx
mulsd xmm0, qword [edi + 0x58]
subsd xmm0, qword [edi + 0x48]
mulsd xmm1, xmm0
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cvttsd2si ecx, xmm1
movd xmm1, eax
mov eax, dword [ebp - 0x138]
sub eax, esi
cvtdq2pd xmm1, xmm1
push ecx
mov ecx, dword [ebp - 0x140]
movd xmm0, eax
mov eax, ebx
cvtdq2pd xmm0, xmm0
sub eax, esi
divsd xmm1, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cvttsd2si eax, xmm1
push eax
cmp ebx, esi
jne 0x410728
lea eax, [ebp - 0x17c]
push eax
call fcn.00419b00
jmp 0x41072d
call fcn.00419acb
mov eax, dword [edi + 0x30]
inc ebx
mov dword [ebp - 0x138], eax
cmp ebx, eax
jle 0x410670
lea ecx, [ebp - 0x148]
mov dword [ebp - method.CPen.virtual_0], vtable.CPen.0
call fcn.00402b60
mov eax, dword [ebp - 0x134]
mov ebx, dword [ebp - 0x140]
inc eax
mov dword [ebp - 0x134], eax
cmp eax, dword [edi + 0x20]
jl 0x410610
mov dword [ebp - 0x15c], 0
mov dword [ebp - method.CPen.virtual_0], vtable.CPen.0
push 0x808080
push 1
push 0
mov byte [ebp - 4], 4
call dword [sym.imp.GDI32.dll_CreatePen]
push eax
lea ecx, [ebp - 0x160]
call fcn.00419637
lea eax, [ebp - 0x160]
mov ecx, ebx
push eax
call fcn.00419e64
mov eax, dword [ebx]
mov ecx, ebx
push 5
call dword [eax + 0x24]
mov eax, dword [edi + 0x14]
inc eax
push eax
mov eax, dword [edi + 0x18]
inc eax
push eax
push dword [edi + 0x1c]
push dword [edi + 0x10]
push dword [ebx + 4]
call dword [sym.imp.GDI32.dll_Rectangle]
push dword [ebp - 0x170]
mov ecx, ebx
call fcn.00419e64
push dword [ebp - 0x174]
mov ecx, ebx
call fcn.00419e64
lea ecx, [ebp - 0x160]
mov dword [edi + 0x60], 0xffffffff
mov dword [edi + 0x64], 0xffffffff
mov dword [ebp - method.CPen.virtual_0], vtable.CPen.0
call fcn.00402b60
lea ecx, [ebp - 0x150]
mov dword [ebp - method.CPen.virtual_0], vtable.CPen.0
call fcn.00402b60
lea ecx, [ebp - 0x168]
mov dword [ebp - method.CPen.virtual_0], vtable.CPen.0
call fcn.00402b60
lea ecx, [ebp - 0x158]
mov dword [ebp - method.CPen.virtual_0], vtable.CPen.0
call fcn.00402b60
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00561419
mov esp, ebp
pop ebp
ret 0xc