Function at 0x403e40
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5d285a
mov eax, dword fs:[0]
push eax
sub esp, 0x190
mov eax, dword [0x632da0]
xor eax, esp
mov dword [esp + 0x188], eax
push ebx
push esi
push edi
mov eax, dword [0x632da0]
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 esi, esi
mov edi, ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x40], esi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeUnit::constructor_void_]
cmp dword [ebx + 0x10], esi
mov dword [esp + 0x1a8], esi
jle 0x40445e
push esi
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 + 0x20], edx
mov cl, byte [eax + 8]
mov byte [esp + 0x24], cl
fld dword [eax + 0xc]
fstp dword [esp + 0x28]
lea ecx, [esp + 0x78]
fld dword [eax + 0x10]
fstp dword [esp + 0x2c]
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
mov al, byte [esp + 0x24]
xor ecx, ecx
mov dword [esp + 0x18], ecx
cmp al, 3
je 0x4041bf
cmp al, 6
je 0x404132
cmp al, 0xd
jne 0x404454
fld dword [esp + 0x28]
fld st(0)
fabs
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fld dword [0x5eee0c]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x403f42
fld dword [esp + 0x2c]
fabs
fstp dword [esp + 0x14]
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 5
jp 0x403f4c
jmp 0x403f44
fstp st(0)
mov dword [esp + 0x18], 1
push ecx
mov dword [esp + 0x48], ecx
fstp dword [esp]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], ecx
mov ecx, edi
call fcn.00403cb0
fld dword [esp + 0x2c]
push ecx
mov ecx, edi
fstp dword [esp]
mov dword [esp + 0x48], eax
call fcn.00403cb0
inc esi
push esi
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 + 0x20], ecx
mov dl, byte [eax + 8]
mov byte [esp + 0x24], dl
fld dword [eax + 0xc]
fstp dword [esp + 0x28]
lea ecx, [esp + 0xd0]
fld dword [eax + 0x10]
fstp dword [esp + 0x2c]
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
fld dword [esp + 0x28]
fld st(0)
fabs
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fld dword [0x5eee0c]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x403ff9
fld dword [esp + 0x2c]
fabs
fstp dword [esp + 0x14]
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 5
jp 0x404003
jmp 0x403ffb
fstp st(0)
mov dword [esp + 0x18], 1
push ecx
mov ecx, edi
fstp dword [esp]
call fcn.00403cb0
fld dword [esp + 0x2c]
push ecx
mov ecx, edi
fstp dword [esp]
mov dword [esp + 0x68], eax
call fcn.00403cb0
mov dword [esp + 0x68], eax
inc esi
push esi
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 + 0x20], ecx
mov dl, byte [eax + 8]
mov byte [esp + 0x24], dl
fld dword [eax + 0xc]
fstp dword [esp + 0x28]
lea ecx, [esp + 0xa8]
fld dword [eax + 0x10]
fstp dword [esp + 0x2c]
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
fld dword [esp + 0x28]
fld st(0)
fabs
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fld dword [0x5eee0c]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x404098
fld dword [esp + 0x2c]
fabs
fstp dword [esp + 0x14]
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 5
jp 0x4040a2
jmp 0x40409a
fstp st(0)
mov dword [esp + 0x18], 1
push ecx
mov ecx, edi
fstp dword [esp]
call fcn.00403cb0
fld dword [esp + 0x2c]
push ecx
mov ecx, edi
fstp dword [esp]
mov dword [esp + 0x60], eax
call fcn.00403cb0
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.004f0210
push 0
push 0
push eax
lea ecx, [esp + 0x14c]
mov byte [esp + 0x1b4], 6
call fcn.00516c80
lea ecx, [esp + 0xf8]
mov byte [esp + 0x1a8], 8
call fcn.004f08d0
cmp dword [esp + 0x18], 0
jne 0x404126
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
mov eax, dword [eax + 0x74]
lea edx, [esp + 0x140]
push edx
call eax
lea ecx, [esp + 0x140]
jmp 0x404447
mov ecx, 1
cmp dword [esp + 0x40], ecx
je 0x404454
fld dword [esp + 0x28]
fld st(0)
fabs
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fld dword [0x5eee0c]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x404179
fld dword [esp + 0x2c]
fabs
fstp dword [esp + 0x14]
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 5
jp 0x40417f
jmp 0x40417b
fstp st(0)
mov dword [esp + 0x18], ecx
push ecx
mov ecx, edi
fstp dword [esp]
call fcn.00403cb0
fld dword [esp + 0x2c]
push ecx
mov ecx, edi
fstp dword [esp]
mov dword [esp + 0x50], eax
call fcn.00403cb0
cmp dword [esp + 0x18], 0
mov dword [esp + 0x50], eax
jne 0x404454
lea ecx, [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x34]
call fcn.00526dc0
jmp 0x404454
fld dword [esp + 0x28]
push ecx
mov dword [esp + 0x58], ecx
fstp dword [esp]
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x18], ecx
mov ecx, edi
call fcn.00403cb0
fld dword [esp + 0x2c]
push ecx
mov ecx, edi
fstp dword [esp]
mov dword [esp + 0x58], eax
call fcn.00403cb0
inc esi
push esi
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 + 0x20], ecx
mov dl, byte [eax + 8]
mov byte [esp + 0x24], dl
fld dword [eax + 0xc]
fstp dword [esp + 0x28]
lea ecx, [esp + 0xbc]
fld dword [eax + 0x10]
fstp dword [esp + 0x2c]
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
fld dword [0x5eee0c]
fld dword [esp + 0x28]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x404249
mov dword [esp + 0x14], 1
fmul qword [0x5eede8]
push ecx
mov ecx, edi
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fstp dword [esp]
call fcn.00403cb0
mov dword [esp + 0x74], eax
inc esi
push esi
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 + 0x20], ecx
mov dl, byte [eax + 8]
mov byte [esp + 0x24], dl
fld dword [eax + 0xc]
fstp dword [esp + 0x28]
lea ecx, [esp + 0xe4]
fld dword [eax + 0x10]
fstp dword [esp + 0x2c]
call dword [sym.imp.BMB_NX_C9.dll_public_virtual:_void___thiscall_BMB2DGeUnit::destructor_void_]
fld dword [esp + 0x28]
mov dword [esp + 0x18], 0
fst qword [esp + 0x6c]
fld dword [esp + 0x2c]
fst qword [esp + 0x34]
fldz
fcompp
fnstsw ax
test ah, 5
jnp 0x4042cc
mov dword [esp + 0x18], 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.005ba5e0
fld qword [esp + 0x8c]
fst qword [esp + 0x34]
fcomp qword [0x5eee00]
fnstsw ax
test ah, 1
jne 0x4043c0
mov eax, dword [ebx + 0x10]
cmp eax, 5
jne 0x4043b3
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 0x40438a
fld dword [esp + 0x88]
fld dword [esp + 0xa4]
fucompp
fnstsw ax
test ah, 0x44
jp 0x40438a
mov ecx, dword [esp + 0x30]
push 0
call fcn.00521b00
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 0x4043c0
cmp eax, 3
jne 0x4043c0
fld qword [esp + 0x6c]
fstp qword [esp + 0x34]
mov eax, dword [esp + 0x18]
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.004f0020
push 0
push 0
push eax
lea ecx, [esp + 0x178]
mov byte [esp + 0x1b4], 3
call fcn.00516c80
lea ecx, [esp + 0x11c]
mov byte [esp + 0x1a8], 5
call fcn.004f08d0
cmp dword [esp + 0x14], 0
jne 0x404440
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
mov eax, dword [eax + 0x74]
lea edx, [esp + 0x16c]
push edx
call eax
lea ecx, [esp + 0x16c]
mov byte [esp + 0x1a8], 0
call fcn.00516cb0
inc esi
cmp esi, dword [ebx + 0x10]
jl 0x403eb4
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
mov eax, dword [edx + 0x78]
push 0xff
call eax
lea ecx, [esp + 0x1c]
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.005bf276
mov esp, ebp
pop ebp
ret 8