Function at 0x403e20
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5d7d9a
mov eax, dword fs:[0]
push eax
sub esp, 0x190
mov eax, dword [0x638190]
xor eax, esp
mov dword [esp + 0x188], eax
push ebx
push esi
push edi
mov eax, dword [0x638190]
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 0x40443e
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 0x40419f
cmp al, 6
je 0x404112
cmp al, 0xd
jne 0x404434
fld dword [esp + 0x28]
fld st(0)
fabs
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fld dword [0x5f3e14]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x403f22
fld dword [esp + 0x2c]
fabs
fstp dword [esp + 0x14]
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 5
jp 0x403f2c
jmp 0x403f24
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.00403c90
fld dword [esp + 0x2c]
push ecx
mov ecx, edi
fstp dword [esp]
mov dword [esp + 0x48], eax
call fcn.00403c90
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 [0x5f3e14]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x403fd9
fld dword [esp + 0x2c]
fabs
fstp dword [esp + 0x14]
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 5
jp 0x403fe3
jmp 0x403fdb
fstp st(0)
mov dword [esp + 0x18], 1
push ecx
mov ecx, edi
fstp dword [esp]
call fcn.00403c90
fld dword [esp + 0x2c]
push ecx
mov ecx, edi
fstp dword [esp]
mov dword [esp + 0x68], eax
call fcn.00403c90
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 [0x5f3e14]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x404078
fld dword [esp + 0x2c]
fabs
fstp dword [esp + 0x14]
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 5
jp 0x404082
jmp 0x40407a
fstp st(0)
mov dword [esp + 0x18], 1
push ecx
mov ecx, edi
fstp dword [esp]
call fcn.00403c90
fld dword [esp + 0x2c]
push ecx
mov ecx, edi
fstp dword [esp]
mov dword [esp + 0x60], eax
call fcn.00403c90
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.004f14a0
push 0
push 0
push eax
lea ecx, [esp + 0x14c]
mov byte [esp + 0x1b4], 6
call fcn.0051a800
lea ecx, [esp + 0xf8]
mov byte [esp + 0x1a8], 8
call fcn.004f1b60
cmp dword [esp + 0x18], 0
jne 0x404106
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 0x404427
mov ecx, 1
cmp dword [esp + 0x40], ecx
je 0x404434
fld dword [esp + 0x28]
fld st(0)
fabs
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fld dword [0x5f3e14]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x404159
fld dword [esp + 0x2c]
fabs
fstp dword [esp + 0x14]
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 5
jp 0x40415f
jmp 0x40415b
fstp st(0)
mov dword [esp + 0x18], ecx
push ecx
mov ecx, edi
fstp dword [esp]
call fcn.00403c90
fld dword [esp + 0x2c]
push ecx
mov ecx, edi
fstp dword [esp]
mov dword [esp + 0x50], eax
call fcn.00403c90
cmp dword [esp + 0x18], 0
mov dword [esp + 0x50], eax
jne 0x404434
lea ecx, [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x34]
call fcn.0052ad30
jmp 0x404434
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.00403c90
fld dword [esp + 0x2c]
push ecx
mov ecx, edi
fstp dword [esp]
mov dword [esp + 0x58], eax
call fcn.00403c90
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 [0x5f3e14]
fld dword [esp + 0x28]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x404229
mov dword [esp + 0x14], 1
fmul qword [0x5f3df0]
push ecx
mov ecx, edi
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fstp dword [esp]
call fcn.00403c90
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 0x4042ac
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.005bee30
fld qword [esp + 0x8c]
fst qword [esp + 0x34]
fcomp qword [0x5f3e08]
fnstsw ax
test ah, 1
jne 0x4043a0
mov eax, dword [ebx + 0x10]
cmp eax, 5
jne 0x404393
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 0x40436a
fld dword [esp + 0x88]
fld dword [esp + 0xa4]
fucompp
fnstsw ax
test ah, 0x44
jp 0x40436a
mov ecx, dword [esp + 0x30]
push 0
call fcn.00525680
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 0x4043a0
cmp eax, 3
jne 0x4043a0
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.004f12b0
push 0
push 0
push eax
lea ecx, [esp + 0x178]
mov byte [esp + 0x1b4], 3
call fcn.0051a800
lea ecx, [esp + 0x11c]
mov byte [esp + 0x1a8], 5
call fcn.004f1b60
cmp dword [esp + 0x14], 0
jne 0x404420
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.0051a830
inc esi
cmp esi, dword [ebx + 0x10]
jl 0x403e94
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.005c3bb6
mov esp, ebp
pop ebp
ret 8