Function at 0x40f8f0
Capabilities:
Check os version
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x68ef83
mov eax, dword fs:[0]
push eax
sub esp, 0x12c
push ebx
push esi
mov eax, dword [0x70c004]
xor eax, esp
push eax
lea eax, [esp + 0x138]
mov dword fs:[0], eax
mov eax, dword [edi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [ecx + 0x138d4]
mov dword [esp + 0x3c], edx
fild dword [esp + 0x3c]
mov ecx, dword [ecx + 0x138d8]
mov dword [esp + 0x40], ecx
fdiv qword [0x6cfc58]
mov eax, dword [eax + 8]
lea edx, [esp + 0x44]
push edx
lea ecx, [eax + 0x80918]
fstp dword [esp + 0x3c]
call fcn.0046f4f8
mov ecx, eax
call fcn.00474569
push 0x10
xor ebx, ebx
push str.objp001_000.bmp
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], ebx
mov byte [esp + 0x20], bl
call fcn.004051a0
push ebx
push 1
mov dword [esp + 0x148], ebx
mov eax, dword [edi + 0x5edb8]
mov edx, dword [eax + 0x140]
lea esi, [edi + 0x5edb8]
push 0x15
lea ecx, [esp + 0x20]
push ecx
mov ecx, esi
call edx
mov dword [esp + 0x140], 0xffffffff
cmp dword [esp + 0x2c], 0x10
jb 0x40f9cb
mov eax, dword [esp + 0x18]
push eax
call fcn.0045c06d
add esp, 4
mov ecx, 3
push ecx
mov eax, 1
push eax
push esi
lea ecx, [edi + 0x5ee4c]
call fcn.004c3ce9
push 0x10
push str.objp000_000.bmp
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], ebx
mov byte [esp + 0x20], 0
call fcn.004051a0
push ebx
push 1
mov dword [esp + 0x148], 1
mov edx, dword [edi + 0x5ee5c]
mov edx, dword [edx + 0x140]
lea ecx, [edi + 0x5ee5c]
push 0x15
lea eax, [esp + 0x20]
push eax
call edx
mov dword [esp + 0x140], 0xffffffff
cmp dword [esp + 0x2c], 0x10
jb 0x40fa4c
mov eax, dword [esp + 0x18]
push eax
call fcn.0045c06d
add esp, 4
fld dword [0x6d03ec]
lea esi, [edi + 0x5eef0]
fstp dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
fld dword [0x6d03e8]
mov dword [esp + 0x14], ecx
fst dword [esp + 0x10]
mov edx, dword [esp + 0x10]
fld dword [0x6d03e4]
mov dword [esp + 0x18], edx
fstp dword [esp + 0xc]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x1c], eax
fst dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
fld dword [0x6d03e0]
mov dword [esp + 0x20], ecx
fstp dword [esp + 0xc]
mov edx, dword [esp + 0xc]
mov dword [esp + 0x24], edx
fstp dword [esp + 0x10]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x28], eax
mov edx, dword [esi]
mov eax, 4
push eax
push ebx
mov eax, 3
push eax
push ebx
mov eax, 2
push eax
push ebx
mov eax, 1
push eax
push ebx
xor eax, eax
push eax
push ebx
mov eax, 5
push eax
mov eax, 3
push eax
lea eax, [edi + 0x5ee5c]
push eax
mov eax, dword [edx + 0x84]
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push 0
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 8]
push 1
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
push 0
mov ecx, esi
call eax
fld dword [esp + ebx*8 + 0x14]
fld dword [esp + 0x38]
fld st(0)
fmulp st(2)
fxch st(1)
call fcn.0064b350
fmul dword [esp + ebx*8 + 0x18]
mov dword [esp + 0xc], eax
call fcn.0064b350
mov edx, dword [esi]
mov edx, dword [edx + 0x2c]
push eax
mov eax, dword [esp + 0x10]
push eax
mov ecx, esi
call edx
fld dword [esp + 0x38]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
push eax
push ecx
push ecx
mov ecx, esi
fstp dword [esp]
call fcn.004c32e5
push 0
push esi
lea eax, [edi + 0x5f07c]
push eax
call fcn.0044e770
inc ebx
add esi, 0x84
cmp ebx, 3
jb 0x40fab2
mov eax, dword [edi + 8]
mov esi, 2
mov ebx, 0x10
mov dword [edi + 0x5f0a8], esi
mov eax, dword [eax + 8]
push ebx
push str.objl002_000.bmp
lea ecx, [esp + 0x1c]
mov dword [edi + 0x5f084], eax
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], 0
mov byte [esp + 0x20], 0
call fcn.004051a0
push 0
push 1
mov dword [esp + 0x148], esi
mov edx, dword [edi + 0x5f0b0]
mov edx, dword [edx + 0x140]
lea ecx, [edi + 0x5f0b0]
push 0x15
lea eax, [esp + 0x20]
push eax
call edx
or esi, 0xffffffff
mov dword [esp + 0x140], esi
cmp dword [esp + 0x2c], ebx
jb 0x40fbfc
mov eax, dword [esp + 0x18]
push eax
call fcn.0045c06d
add esp, 4
push ebx
push str.objl002_002.bmp
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], 0
mov byte [esp + 0x20], 0
call fcn.004051a0
push 0
push 1
mov dword [esp + 0x148], 3
mov edx, dword [edi + 0x5f144]
mov edx, dword [edx + 0x140]
lea ecx, [edi + 0x5f144]
push 0x15
lea eax, [esp + 0x20]
push eax
call edx
mov dword [esp + 0x140], esi
cmp dword [esp + 0x2c], ebx
jb 0x40fc64
mov eax, dword [esp + 0x18]
push eax
call fcn.0045c06d
add esp, 4
push ebx
push str.objp003_000.bmp
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], 0
mov byte [esp + 0x20], 0
call fcn.004051a0
push 0
push 1
mov dword [esp + 0x148], 4
mov edx, dword [edi + 0x5f1d8]
mov edx, dword [edx + 0x140]
lea ecx, [edi + 0x5f1d8]
push 0x15
lea eax, [esp + 0x20]
push eax
call edx
mov dword [esp + 0x140], esi
cmp dword [esp + 0x2c], ebx
jb 0x40fccc
mov eax, dword [esp + 0x18]
push eax
call fcn.0045c06d
add esp, 4
push ebx
push str.objl004_002.bmp
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], 0
mov byte [esp + 0x20], 0
call fcn.004051a0
push 0
push 1
mov dword [esp + 0x148], 5
mov edx, dword [edi + 0x5f26c]
mov edx, dword [edx + 0x140]
lea ecx, [edi + 0x5f26c]
push 0x15
lea eax, [esp + 0x20]
push eax
call edx
mov dword [esp + 0x140], esi
cmp dword [esp + 0x2c], ebx
jb 0x40fd34
mov eax, dword [esp + 0x18]
push eax
call fcn.0045c06d
add esp, 4
push ebx
push str.objl004_000.bmp
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], 0
mov byte [esp + 0x20], 0
call fcn.004051a0
push 0
push 1
mov dword [esp + 0x148], 6
mov edx, dword [edi + 0x5f300]
mov edx, dword [edx + 0x140]
lea ecx, [edi + 0x5f300]
push 0x15
lea eax, [esp + 0x20]
push eax
call edx
mov dword [esp + 0x140], esi
cmp dword [esp + 0x2c], ebx
jb 0x40fd9c
mov eax, dword [esp + 0x18]
push eax
call fcn.0045c06d
add esp, 4
fld dword [0x6d03dc]
fstp dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
fld dword [0x6d03d8]
mov dword [esp + 0x7c], ecx
fst dword [esp + 0x10]
mov edx, dword [esp + 0x10]
fld dword [0x6d03d4]
mov dword [esp + 0x80], edx
fstp dword [esp + 0xc]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x84], eax
fst dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
fld dword [0x6d03d0]
mov dword [esp + 0x88], ecx
fstp dword [esp + 0xc]
mov edx, dword [esp + 0xc]
mov dword [esp + 0x8c], edx
fst dword [esp + 0x10]
mov eax, dword [esp + 0x10]
fld dword [0x6d03cc]
mov dword [esp + 0x90], eax
fstp dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x94], ecx
fst dword [esp + 0x10]
mov edx, dword [esp + 0x10]
fld dword [0x6d03c8]
mov dword [esp + 0x98], edx
fstp dword [esp + 0xc]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x9c], eax
fstp dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
fld dword [0x6d03c4]
mov dword [esp + 0xa0], ecx
fstp dword [esp + 0xc]
mov edx, dword [esp + 0xc]
fld dword [0x6d03c0]
mov dword [esp + 0x54], edx
fst dword [esp + 0x10]
mov eax, dword [esp + 0x10]
fld dword [0x6d03bc]
mov dword [esp + 0x58], eax
fstp dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x5c], ecx
fst dword [esp + 0x10]
mov edx, dword [esp + 0x10]
fld dword [0x6d03b8]
mov dword [esp + 0x60], edx
fstp dword [esp + 0xc]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x64], eax
fst dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
fld dword [0x6d03b4]
mov dword [esp + 0x68], ecx
fstp dword [esp + 0xc]
mov edx, dword [esp + 0xc]
mov dword [esp + 0x6c], edx
fst dword [esp + 0x10]
mov eax, dword [esp + 0x10]
fld dword [0x6d03b0]
mov dword [esp + 0x70], eax
fstp dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x74], ecx
fstp dword [esp + 0x10]
mov edx, dword [esp + 0x10]
xor ecx, ecx
mov dword [esp + 0x78], edx
xor esi, esi
jmp 0x40fef7
xor ecx, ecx
cmp esi, 4
ja case.default.0x40ff00
jmp dword [esi*4 + 0x4103e8]
mov eax, 4
push eax
push esi
lea edx, [eax - 1]
push edx
push esi
mov dword [esp + 0xd8], 2
mov edx, dword [esp + 0xd8]
push edx
push esi
mov dword [esp + 0x110], 1
mov eax, dword [esp + 0x110]
push eax
push esi
mov edx, ecx
push edx
mov dword [esp + 0xdc], 5
mov eax, dword [esp + 0xdc]
push esi
push eax
mov eax, 5
push eax
mov dword [esp + 0x138], ecx
lea eax, [edi + 0x5f0b0]
jmp 0x40ffd7
lea eax, [esi - 2]
mov edx, 4
push edx
push eax
mov dword [esp + 0xd8], 3
mov edx, dword [esp + 0xd8]
push edx
push eax
mov dword [esp + 0x110], 2
mov edx, dword [esp + 0x110]
push edx
push eax
mov dword [esp + 0xc0], 1
mov edx, dword [esp + 0xc0]
push edx
push eax
mov edx, ecx
push edx
push eax
mov dword [esp + 0x100], 5
mov eax, dword [esp + 0x100]
push eax
mov eax, 5
push eax
mov dword [esp + 0x120], ecx
lea eax, [edi + 0x5f144]
mov ecx, esi
imul ecx, ecx, 0x84
mov ebx, dword [ecx + edi + 0x5f394]
mov edx, dword [ebx + 0x84]
lea ecx, [ecx + edi + 0x5f394]
push eax
call edx
mov eax, esi
imul eax, eax, 0x84
mov edx, dword [eax + edi + 0x5f394]
lea ebx, [eax + edi + 0x5f394]
mov eax, dword [edx + 0x18]
push 0
mov ecx, ebx
mov dword [esp + 0x54], ebx
call eax
mov edx, dword [ebx]
mov eax, dword [edx + 8]
push 1
mov ecx, ebx
call eax
mov edx, dword [ebx]
mov eax, dword [edx + 0xc]
push 0
mov ecx, ebx
call eax
fld dword [esp + esi*8 + 0x7c]
fld dword [esp + 0x38]
fld st(0)
fmulp st(2)
fxch st(1)
call fcn.0064b350
fmul dword [esp + esi*8 + 0x80]
mov dword [esp + 0xac], eax
call fcn.0064b350
mov edx, dword [ebx]
mov edx, dword [edx + 0x2c]
push eax
mov eax, dword [esp + 0xb0]
push eax
mov ecx, ebx
call edx
fld dword [esp + 0x38]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
push eax
push ecx
push ecx
mov ecx, ebx
fstp dword [esp]
call fcn.004c32e5
cmp esi, 4
ja case.default.0x410089
jmp dword [esi*4 + 0x4103fc]
mov edx, dword [edi + 0x5f628]
lea ebx, [edi + 0x5f628]
lea eax, [edi + 0x5f1d8]
push eax
mov eax, dword [edx + 0x28]
mov ecx, ebx
call eax
mov edx, dword [edi + 0x5f1d8]
mov edx, dword [edx + 0x1c]
lea ecx, [edi + 0x5f1d8]
lea eax, [esp + 0x10c]
push eax
call edx
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0xc], ecx
xor ecx, ecx
sub esp, 0x10
mov eax, esp
mov dword [esp + 0x138], ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x20], edx
mov edx, dword [ebx]
mov edx, dword [edx + 0x4c]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x20]
mov dword [eax + 0xc], ecx
mov ecx, ebx
call edx
jmp case.default.0x410089
mov edx, dword [edi + 0x5f784]
lea ebx, [edi + 0x5f784]
lea eax, [edi + 0x5f26c]
push eax
mov eax, dword [edx + 0x28]
mov ecx, ebx
call eax
mov edx, dword [edi + 0x5f26c]
mov edx, dword [edx + 0x1c]
lea ecx, [edi + 0x5f26c]
lea eax, [esp + 0x114]
push eax
call edx
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0xc], ecx
xor ecx, ecx
sub esp, 0x10
mov eax, esp
mov dword [esp + 0x28], ecx
mov dword [eax], ecx
jmp 0x4100dc
mov eax, esi
imul eax, eax, 0x15c
mov edx, dword [eax + edi + 0x5f628]
lea ebx, [eax + edi + 0x5f628]
lea eax, [edi + 0x5f300]
push eax
mov eax, dword [edx + 0x28]
mov ecx, ebx
call eax
mov edx, dword [edi + 0x5f300]
mov edx, dword [edx + 0x1c]
lea ecx, [edi + 0x5f300]
lea eax, [esp + 0x11c]
push eax
call edx
mov ecx, dword [eax]
mov dword [esp + 0xc], ecx
mov ecx, dword [eax + 4]
mov eax, 0x2e8ba2e9
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [esi + 4]
imul ecx, eax
mov dword [esp + 0xe0], ecx
lea ecx, [esi + 5]
imul ecx, eax
xor edx, edx
sub esp, 0x10
mov eax, esp
mov dword [eax], edx
mov edx, dword [esp + 0xf0]
mov dword [eax + 4], edx
mov dword [esp + 0xf8], ecx
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0xf8]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, dword [ebx]
mov eax, dword [eax + 0x4c]
mov ecx, ebx
call eax
mov ecx, esi
imul ecx, ecx, 0x15c
mov edx, dword [ecx + edi + 0x5f628]
mov eax, dword [edx + 0x48]
lea ebx, [ecx + edi + 0x5f628]
push 0xff
mov ecx, ebx
call eax
mov edx, dword [ebx]
mov eax, dword [edx + 0x50]
push 0xf
mov ecx, ebx
call eax
fld dword [esp + esi*8 + 0x54]
fld dword [esp + 0x38]
fld st(0)
fmulp st(2)
fxch st(1)
call fcn.0064b350
fmul dword [esp + esi*8 + 0x58]
mov dword [esp + 0xbc], eax
call fcn.0064b350
mov edx, dword [ebx]
mov edx, dword [edx + 0x44]
push eax
mov eax, dword [esp + 0xc0]
push eax
mov ecx, ebx
call edx
mov eax, dword [esp + 0x50]
push ebx
push eax
lea eax, [edi + 0x5fcf4]
push eax
call fcn.0044e770
inc esi
cmp esi, 5
jb 0x40fef5
mov eax, dword [edi + 8]
mov dword [edi + 0x5fd20], 2
mov ecx, dword [eax + 8]
mov dword [edi + 0x5fcfc], ecx
mov eax, dword [eax + 8]
lea ecx, [eax + 0x1f90]
call fcn.0046942d
test al, al
jne 0x4102b3
lea esi, [edi + 0x5fd00]
push 1
mov eax, esi
call fcn.0044fd00
cmp dword [eax], 0
je 0x4102b3
push 1
mov eax, esi
call fcn.0044fd00
mov ecx, dword [eax]
mov edx, dword [ecx]
mov eax, dword [edx + 0x7c]
call eax
mov edx, dword [edi + 0x5f394]
mov edx, dword [edx + 0x30]
lea ecx, [edi + 0x5f394]
lea eax, [esp + 0x3c]
push eax
call edx
fld dword [esp + 0x38]
fld qword [0x6d03a8]
fmul st(1)
call fcn.0064b350
mov ecx, dword [esp + 0x40]
add ecx, eax
mov eax, dword [esp + 0x3c]
push ecx
push eax
push ecx
lea esi, [edi + 0x5fd28]
fstp dword [esp]
mov dword [esp + 0x4c], ecx
call fcn.00454c70
push 0x14
mov ebx, 0xf
push str.MsgWinSquareFilename
lea ecx, [esp + 0x5c]
mov dword [esp + 0x74], ebx
mov dword [esp + 0x70], 0
mov byte [esp + 0x60], 0
call fcn.004051a0
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x80]
push edx
mov dword [esp + 0x148], 7
call fcn.0046f7b8
mov ecx, eax
call fcn.004704b6
push 0
push 1
mov byte [esp + 0x148], 8
mov edx, dword [edi + 0x5ebfc]
lea ecx, [edi + 0x5ebfc]
push 0x15
push eax
mov eax, dword [edx + 0x140]
call eax
mov esi, 0x10
cmp dword [esp + 0x94], esi
jb 0x410384
mov ecx, dword [esp + 0x80]
push ecx
call fcn.0045c06d
add esp, 4
mov dword [esp + 0x94], ebx
xor ebx, ebx
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
cmp dword [esp + 0x6c], esi
jb 0x4103ae
mov edx, dword [esp + 0x58]
push edx
call fcn.0045c06d
add esp, 4
mov dword [edi + 0x5fe44], 0x80
mov dword [edi + 0x5fe40], 1
mov dword [edi + 0x5fe3c], ebx
mov dword [edi + 0x5fe38], 0xffffffff
mov ecx, dword [esp + 0x138]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret