Function at 0x4040a0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5d09ea
mov eax, dword fs:[0]
push eax
sub esp, 0x190
mov eax, dword [0x62fda0]
xor eax, esp
mov dword [esp + 0x188], eax
push ebx
push esi
push edi
mov eax, dword [0x62fda0]
xor eax, esp
push eax
lea eax, [esp + 0x1a0]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
xor edi, edi
mov esi, ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], eax
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x40], edi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeUnit::constructor_void_]
cmp dword [ebx + 0x10], edi
mov dword [esp + 0x1a8], edi
jle 0x4045ff
push edi
lea ecx, [esp + 0x7c]
push ecx
mov ecx, ebx
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMB2DGeUnit___thiscall_BMB2DGeometry::GetGeUnit_int_]
mov edx, dword [eax + 4]
mov dword [esp + 0x1c], edx
movzx ecx, byte [eax + 8]
mov byte [esp + 0x20], cl
lea ecx, [esp + 0x78]
fld dword [eax + 0xc]
fstp dword [esp + 0x24]
fld dword [eax + 0x10]
fstp dword [esp + 0x28]
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
mov cl, byte [esp + 0x20]
xor eax, eax
mov dword [esp + 0x14], eax
cmp cl, 3
je 0x404362
cmp cl, 6
je 0x4042d5
cmp cl, 0xd
jne 0x4045f5
fld dword [esp + 0x24]
push ecx
mov ecx, esi
fstp dword [esp]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
call fcn.004038a0
fld dword [esp + 0x28]
push ecx
mov ecx, esi
fstp dword [esp]
mov dword [esp + 0x48], eax
call fcn.004038a0
inc edi
push edi
lea edx, [esp + 0xd4]
push edx
mov ecx, ebx
mov dword [esp + 0x50], eax
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMB2DGeUnit___thiscall_BMB2DGeometry::GetGeUnit_int_]
mov ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
movzx edx, byte [eax + 8]
mov byte [esp + 0x20], dl
lea ecx, [esp + 0xd0]
fld dword [eax + 0xc]
fstp dword [esp + 0x24]
fld dword [eax + 0x10]
fstp dword [esp + 0x28]
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
fld dword [esp + 0x24]
push ecx
mov ecx, esi
fstp dword [esp]
call fcn.004038a0
fld dword [esp + 0x28]
push ecx
mov ecx, esi
fstp dword [esp]
mov dword [esp + 0x68], eax
call fcn.004038a0
mov dword [esp + 0x68], eax
inc edi
push edi
lea eax, [esp + 0xac]
push eax
mov ecx, ebx
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMB2DGeUnit___thiscall_BMB2DGeometry::GetGeUnit_int_]
mov ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
movzx edx, byte [eax + 8]
mov byte [esp + 0x20], dl
lea ecx, [esp + 0xa8]
fld dword [eax + 0xc]
fstp dword [esp + 0x24]
fld dword [eax + 0x10]
fstp dword [esp + 0x28]
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
fld dword [esp + 0x24]
push ecx
mov ecx, esi
fstp dword [esp]
call fcn.004038a0
fld dword [esp + 0x28]
push ecx
mov ecx, esi
fstp dword [esp]
mov dword [esp + 0x60], eax
call fcn.004038a0
mov dword [esp + 0x60], eax
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0x104]
call fcn.004ee430
push 0
push 0
push eax
lea ecx, [esp + 0x14c]
mov byte [esp + 0x1b4], 6
call fcn.00514e80
lea ecx, [esp + 0xf8]
mov byte [esp + 0x1a8], 8
call fcn.004eeaf0
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x140]
push eax
call fcn.0052d840
lea ecx, [esp + 0x140]
jmp 0x4045e8
mov ecx, 1
cmp dword [esp + 0x40], ecx
je 0x4045f5
fld dword [esp + 0x24]
fld st(0)
fabs
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fld dword [0x5ecc9c]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x40431c
fld dword [esp + 0x28]
fabs
fstp dword [esp + 0x2c]
fcomp dword [esp + 0x2c]
fnstsw ax
test ah, 5
jp 0x404322
jmp 0x40431e
fstp st(0)
mov dword [esp + 0x14], ecx
push ecx
mov ecx, esi
fstp dword [esp]
call fcn.004038a0
fld dword [esp + 0x28]
push ecx
mov ecx, esi
fstp dword [esp]
mov dword [esp + 0x50], eax
call fcn.004038a0
cmp dword [esp + 0x14], 0
mov dword [esp + 0x50], eax
jne 0x4045f5
lea ecx, [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x34]
call fcn.0052d7e0
jmp 0x4045f5
fld dword [esp + 0x24]
push ecx
mov ecx, esi
fstp dword [esp]
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x30], eax
call fcn.004038a0
fld dword [esp + 0x28]
push ecx
mov ecx, esi
fstp dword [esp]
mov dword [esp + 0x58], eax
call fcn.004038a0
inc edi
push edi
lea edx, [esp + 0xc0]
push edx
mov ecx, ebx
mov dword [esp + 0x60], eax
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMB2DGeUnit___thiscall_BMB2DGeometry::GetGeUnit_int_]
mov ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
mov dl, byte [eax + 8]
mov byte [esp + 0x20], dl
fld dword [eax + 0xc]
fstp dword [esp + 0x24]
lea ecx, [esp + 0xbc]
fld dword [eax + 0x10]
fstp dword [esp + 0x28]
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
fld dword [0x5ecc9c]
fld dword [esp + 0x24]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x4043ec
mov dword [esp + 0x2c], 1
fmul qword [0x5ecc78]
push ecx
mov ecx, esi
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fstp dword [esp]
call fcn.004038a0
mov dword [esp + 0x74], eax
inc edi
push edi
lea eax, [esp + 0xe8]
push eax
mov ecx, ebx
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMB2DGeUnit___thiscall_BMB2DGeometry::GetGeUnit_int_]
mov ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
mov dl, byte [eax + 8]
mov byte [esp + 0x20], dl
fld dword [eax + 0xc]
fstp dword [esp + 0x24]
lea ecx, [esp + 0xe4]
fld dword [eax + 0x10]
fstp dword [esp + 0x28]
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
fld dword [esp + 0x24]
mov dword [esp + 0x14], 0
fst qword [esp + 0x6c]
fld dword [esp + 0x28]
fst qword [esp + 0x34]
fldz
fcompp
fnstsw ax
test ah, 5
jnp 0x40446f
mov dword [esp + 0x14], 1
sub esp, 8
mov eax, esp
fstp qword [eax]
lea eax, [esp + 0x94]
mov dword [esp + 0x44], esp
push eax
lea ecx, [esp + 0x40]
call fcn.005b8630
fld qword [esp + 0x8c]
fst qword [esp + 0x34]
fcomp qword [0x5ecc90]
fnstsw ax
test ah, 1
jne 0x404563
mov eax, dword [ebx + 0x10]
cmp eax, 5
jne 0x404556
push 0
lea ecx, [esp + 0x7c]
push ecx
mov ecx, ebx
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMB2DGeUnit___thiscall_BMB2DGeometry::GetGeUnit_int_]
push 4
lea edx, [esp + 0x98]
push edx
mov ecx, ebx
mov byte [esp + 0x1b0], 1
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMB2DGeUnit___thiscall_BMB2DGeometry::GetGeUnit_int_]
fld dword [esp + 0x84]
fld dword [esp + 0xa0]
mov byte [esp + 0x1a8], 2
fucompp
fnstsw ax
test ah, 0x44
jp 0x40452d
fld dword [esp + 0x88]
fld dword [esp + 0xa4]
fucompp
fnstsw ax
test ah, 0x44
jp 0x40452d
mov ecx, dword [esp + 0x30]
push 0
call fcn.0052ff50
fld qword [esp + 0x6c]
fstp qword [esp + 0x34]
mov dword [esp + 0x40], 1
lea ecx, [esp + 0x94]
mov byte [esp + 0x1a8], 1
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
lea ecx, [esp + 0x78]
mov byte [esp + 0x1a8], 0
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
jmp 0x404563
cmp eax, 3
jne 0x404563
fld qword [esp + 0x6c]
fstp qword [esp + 0x34]
mov eax, dword [esp + 0x14]
fld qword [esp + 0x34]
mov ecx, dword [esp + 0x74]
push eax
sub esp, 8
mov eax, esp
mov dword [esp + 0x48], esp
fstp qword [eax]
fld qword [esp + 0x78]
sub esp, 8
mov eax, esp
mov dword [esp + 0x50], esp
fstp qword [eax]
push ecx
lea edx, [esp + 0x6c]
push edx
lea ecx, [esp + 0x138]
call fcn.004ee240
push 0
push 0
push eax
lea ecx, [esp + 0x178]
mov byte [esp + 0x1b4], 3
call fcn.00514e80
lea ecx, [esp + 0x11c]
mov byte [esp + 0x1a8], 5
call fcn.004eeaf0
cmp dword [esp + 0x2c], 0
jne 0x4045e1
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x16c]
push eax
call fcn.0052d840
lea ecx, [esp + 0x16c]
mov byte [esp + 0x1a8], 0
call fcn.00514eb0
inc edi
cmp edi, dword [ebx + 0x10]
jl 0x404114
mov ecx, dword [esp + 0x30]
push 0xff
call fcn.0052e6c0
lea ecx, [esp + 0x18]
mov dword [esp + 0x1a8], 0xffffffff
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
xor eax, eax
mov ecx, dword [esp + 0x1a0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x188]
xor ecx, esp
call fcn.005bd2c6
mov esp, ebp
pop ebp
ret 8