Function at 0x40e920
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x60df35
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x67dc50]
xor eax, esp
mov dword [esp + 0x240], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x67dc50]
xor eax, esp
push eax
lea eax, [esp + 0x258]
mov dword fs:[0], eax
mov edi, dword [esp + 0x26c]
mov eax, dword [esp + 0x268]
mov esi, ecx
mov ecx, dword [esp + 0x270]
push ecx
push edi
mov ecx, esi
mov dword [esp + 0x78], eax
mov dword [esp + 0x20], edi
call fcn.0040bcd0
cmp eax, 0xffffffff
jne 0x40e98f
xor eax, eax
jmp 0x40f235
push 0x1c
lea ebx, [eax + 3]
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov ebp, eax
add esp, 4
mov dword [esp + 0x44], ebp
mov dword [esp + 0x260], 0
test ebp, ebp
je 0x40e9c2
mov ecx, ebp
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::constructor_void_]
mov dword [ebp], vtable.BMB2DGeometry.0
jmp 0x40e9c4
xor ebp, ebp
push 0xffffffffffffffff
mov ecx, edi
mov dword [esp + 0x264], 0xffffffff
mov byte [ebp + 8], 3
call fcn.00560200
lea edx, [esp + 0x14]
push edx
mov ecx, esi
mov dword [esp + 0x18], eax
call fcn.00427770
fstp dword [ebp + 0xc]
push ebx
mov ecx, ebp
mov dword [ebp + 0x10], ebx
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::AllocateGeUnitArray_int_]
mov al, byte [edi + 8]
and al, 0xf
cmp al, 1
jne 0x40ea06
jmp 0x40ea15
cmp al, 2
jne 0x40ea0c
jmp 0x40ea15
cmp al, 3
setne al
dec al
and al, 3
fldz
mov ebx, dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::PutGeUnit_int__unsigned_char__float__float_]
sub esp, 8
fstp dword [esp + 4]
movzx eax, al
mov dword [esp + 0x1c], eax
mov ecx, ebp
fild dword [esp + 0x1c]
fstp dword [esp]
push 8
push 0
call ebx
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 0x10]
lea eax, [esp + 0x14]
mov dword [esp + 0x14], ecx
push eax
mov ecx, esi
mov dword [esp + 0x20], edx
call fcn.00427770
push ecx
lea ecx, [esp + 0x20]
fstp dword [esp]
push ecx
mov ecx, esi
call fcn.00427770
push ecx
fstp dword [esp]
push 9
push 1
mov ecx, ebp
call ebx
fldz
mov edx, dword [edi + 0x18]
push ecx
lea eax, [esp + 0x20]
fstp dword [esp]
push eax
mov ecx, esi
mov dword [esp + 0x24], edx
call fcn.00427770
push ecx
fstp dword [esp]
push 0xa
push 2
mov ecx, ebp
call ebx
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x1c]
mov edi, 3
call fcn.0055c160
mov edx, dword [esp + 0x18]
push edx
lea ecx, [esp + 0x134]
call fcn.0056d910
lea ecx, [esp + 0x130]
mov dword [esp + 0x260], 1
call fcn.0056dbc0
lea ecx, [esp + 0x130]
call fcn.0056de00
cmp eax, 0x20
jne 0x40eb32
mov eax, dword [esp + 0x150]
push eax
lea ecx, [esp + 0xc8]
call fcn.0057c850
lea ecx, [esp + 0xa0]
push ecx
lea ecx, [esp + 0xc8]
mov byte [esp + 0x264], 2
call fcn.0057c920
mov edx, dword [eax]
mov dword [esp + 0x28], edx
mov eax, dword [eax + 4]
lea ecx, [esp + 0xc4]
mov dword [esp + 0x2c], eax
mov byte [esp + 0x260], 1
call fcn.0057c8f0
lea ecx, [esp + 0x130]
mov dword [esp + 0x14], 1
call fcn.0056dbc0
mov ecx, dword [esp + 0x13c]
cmp ecx, dword [esp + 0x140]
ja 0x40f20e
lea ebx, [ebx]
lea ecx, [esp + 0x130]
call fcn.0056de00
cmp eax, 0x20
je 0x40f1ee
lea ecx, [esp + 0x130]
call fcn.0056de00
cmp eax, 0x11
je 0x40eca4
cmp eax, 0x16
jne 0x40f1ee
mov edx, dword [esp + 0x150]
push edx
lea ecx, [esp + 0xc8]
call fcn.00579570
mov eax, dword [esp + 0xd0]
mov ecx, dword [esp + 0xd4]
mov byte [esp + 0x260], 3
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
cmp dword [esp + 0x28], eax
jne 0x40ebea
cmp dword [esp + 0x2c], ecx
jne 0x40ebea
lea ecx, [esp + 0xc4]
mov byte [esp + 0x260], 1
call fcn.005795a0
jmp 0x40f1ee
cmp dword [esp + 0x14], 1
jne 0x40ec3d
mov ecx, dword [esp + 0xc8]
mov eax, dword [esp + 0xcc]
lea edx, [esp + 0x84]
mov dword [esp + 0x68], ecx
push edx
mov ecx, esi
mov dword [esp + 0x88], eax
call fcn.00427770
push ecx
lea eax, [esp + 0x6c]
fstp dword [esp]
push eax
mov ecx, esi
call fcn.00427770
push ecx
fstp dword [esp]
push 6
push edi
mov ecx, ebp
call ebx
inc edi
mov dword [esp + 0x14], 0
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
lea eax, [esp + 0x78]
mov dword [esp + 0x78], ecx
push eax
mov ecx, esi
mov dword [esp + 0x84], edx
call fcn.00427770
push ecx
lea ecx, [esp + 0x84]
fstp dword [esp]
push ecx
mov ecx, esi
call fcn.00427770
push ecx
fstp dword [esp]
push 6
push edi
mov ecx, ebp
call ebx
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x4c]
lea ecx, [esp + 0xc4]
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
inc edi
mov byte [esp + 0x260], 1
call fcn.005795a0
jmp 0x40f1ee
mov ecx, dword [esp + 0x150]
push ecx
lea ecx, [esp + 0x108]
call fcn.00573970
cmp dword [esp + 0x270], 1
mov edx, dword [esp + 0x110]
mov eax, dword [esp + 0x108]
mov ecx, dword [esp + 0x10c]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x114]
mov byte [esp + 0x260], 4
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x24], edx
jne 0x40eeb9
cmp dword [esp + 0x110], eax
jne 0x40ed34
cmp edx, ecx
jne 0x40ed34
mov eax, dword [esp + 0x120]
lea ecx, [eax + eax]
lea edx, [esp + 0x1c]
mov dword [esp + 0x1c], ecx
push edx
mov ecx, esi
call fcn.00427770
fld dword [esi + 0x14c]
fcompp
fnstsw ax
test ah, 0x41
je 0x40f1da
lea ecx, [esp + 0x30]
call fcn.00405fd0
fild dword [esi + 0x150]
push 1
sub esp, 8
fdivr qword [0x62e348]
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x110]
mov byte [esp + 0x26c], 5
fstp qword [esp]
push eax
call fcn.0051caa0
cmp dword [esp + 0x14], 1
jne 0x40edeb
cmp dword [esp + 0x30], 0
jle 0x40ed7e
mov eax, dword [esp + 0x38]
jmp 0x40ed89
push 0
lea ecx, [esp + 0x34]
call fcn.005eb180
cmp dword [esp + 0x30], 0
mov ecx, dword [eax + 4]
mov dword [esp + 0x88], ecx
jle 0x40eda0
mov eax, dword [esp + 0x38]
jmp 0x40edab
push 0
lea ecx, [esp + 0x34]
call fcn.005eb180
mov edx, dword [eax]
lea eax, [esp + 0x88]
push eax
mov ecx, esi
mov dword [esp + 0x94], edx
call fcn.00427770
push ecx
lea ecx, [esp + 0x94]
fstp dword [esp]
push ecx
mov ecx, esi
call fcn.00427770
push ecx
fstp dword [esp]
push 6
push 0xffffffffffffffff
mov ecx, ebp
call ebx
inc edi
mov dword [esp + 0x14], 0
mov edx, dword [esp + 0x30]
mov ecx, 1
cmp edx, ecx
mov dword [esp + 0x18], ecx
jle 0x40ee93
jmp 0x40ee06
mov ecx, dword [esp + 0x18]
cmp ecx, edx
jge 0x40ee13
mov eax, dword [esp + 0x38]
lea eax, [eax + ecx*8]
jmp 0x40ee25
push ecx
lea ecx, [esp + 0x34]
call fcn.005eb180
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x18]
cmp ecx, edx
mov eax, dword [eax + 4]
mov dword [esp + 0x98], eax
jge 0x40ee3c
mov edx, dword [esp + 0x38]
lea eax, [edx + ecx*8]
jmp 0x40ee46
push ecx
lea ecx, [esp + 0x34]
call fcn.005eb180
mov eax, dword [eax]
lea ecx, [esp + 0x98]
push ecx
mov ecx, esi
mov dword [esp + 0xb8], eax
call fcn.00427770
push ecx
lea edx, [esp + 0xb8]
fstp dword [esp]
push edx
mov ecx, esi
call fcn.00427770
push ecx
fstp dword [esp]
push 6
push 0xffffffffffffffff
mov ecx, ebp
call ebx
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x30]
inc eax
inc edi
cmp eax, edx
mov dword [esp + 0x18], eax
jl 0x40ee02
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x2c], ecx
lea ecx, [esp + 0x30]
mov dword [esp + 0x28], eax
mov byte [esp + 0x260], 4
call fcn.005ee4c0
jmp 0x40f1da
cmp dword [esp + 0x110], eax
jne 0x40f05e
cmp dword [esp + 0x114], ecx
jne 0x40f05e
lea edx, [esp + 0xbc]
mov dword [esp + 0xbc], ecx
push edx
mov ecx, esi
mov dword [esp + 0x68], eax
call fcn.00427770
push ecx
lea eax, [esp + 0x68]
fstp dword [esp]
push eax
mov ecx, esi
call fcn.00427770
push ecx
fstp dword [esp]
push 6
push edi
mov ecx, ebp
call ebx
lea ecx, [esp + 0xf4]
push ecx
lea ecx, [esp + 0x108]
inc edi
call fcn.00519cc0
push eax
lea ecx, [esp + 0xa4]
call fcn.005eb4a0
mov edx, dword [esp + 0xa4]
mov eax, dword [esp + 0xa0]
lea ecx, [esp + 0x9c]
push ecx
mov ecx, esi
mov dword [esp + 0xa0], edx
mov dword [esp + 0x70], eax
call fcn.00427770
push ecx
lea edx, [esp + 0x70]
fstp dword [esp]
push edx
mov ecx, esi
call fcn.00427770
push ecx
fstp dword [esp]
push 3
push edi
mov ecx, ebp
call ebx
mov eax, dword [esp + 0x120]
lea ecx, [eax + eax]
lea edx, [esp + 0xac]
mov dword [esp + 0xac], ecx
push edx
mov ecx, esi
inc edi
call fcn.00427770
fstp dword [esp + 0x1c]
fldz
sub esp, 8
fstp dword [esp + 4]
mov ecx, ebp
fld dword [esp + 0x24]
fstp dword [esp]
push 1
push edi
call ebx
lea ecx, [esp + 0x104]
inc edi
call fcn.0051b430
fstp dword [esp + 0x18]
mov eax, dword [esp + 0x124]
and eax, 0xfffffff9
cmp ax, 1
jne 0x40efd8
fld dword [esp + 0x18]
fmul qword [0x62dd90]
fstp dword [esp + 0x18]
lea ecx, [esp + 0xec]
push ecx
lea ecx, [esp + 0x108]
call fcn.005189f0
fld qword [eax]
fld dword [esp + 0x18]
sub esp, 8
fstp dword [esp + 4]
mov ecx, ebp
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fstp dword [esp]
push 5
push edi
call ebx
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x74]
push ecx
mov ecx, esi
inc edi
mov dword [esp + 0x78], edx
mov dword [esp + 0xac], eax
call fcn.00427770
push ecx
lea edx, [esp + 0xac]
fstp dword [esp]
push edx
mov ecx, esi
call fcn.00427770
push ecx
fstp dword [esp]
push 6
push edi
mov ecx, ebp
call ebx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
jmp 0x40f1d9
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0x108]
call fcn.0051c840
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x40]
cmp ecx, dword [esp + 0x3c]
jne 0x40f087
cmp dword [esp + 0x54], eax
je 0x40f149
cmp ecx, dword [esp + 0x20]
jne 0x40f09b
mov ecx, dword [esp + 0x54]
cmp ecx, dword [esp + 0x24]
je 0x40f149
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x7c], eax
lea eax, [esp + 0x7c]
push eax
mov ecx, esi
mov dword [esp + 0x18], 1
mov dword [esp + 0xbc], edx
call fcn.00427770
push ecx
lea ecx, [esp + 0xbc]
fstp dword [esp]
push ecx
mov ecx, esi
call fcn.00427770
push ecx
fstp dword [esp]
push 0xd
push edi
mov ecx, ebp
call ebx
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x50]
lea ecx, [esp + 0x58]
push ecx
mov ecx, esi
inc edi
mov dword [esp + 0x5c], edx
mov dword [esp + 0xc4], eax
call fcn.00427770
push ecx
lea edx, [esp + 0xc4]
fstp dword [esp]
push edx
mov ecx, esi
call fcn.00427770
push ecx
fstp dword [esp]
push 6
push edi
mov ecx, ebp
call ebx
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x8c]
mov dword [esp + 0xb0], ecx
push edx
mov ecx, esi
inc edi
mov dword [esp + 0x90], eax
call fcn.00427770
lea eax, [esp + 0xb0]
jmp 0x40f1b2
cmp dword [esp + 0x14], 1
jne 0x40f192
lea ecx, [esp + 0x94]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x3c]
push ecx
mov ecx, esi
mov dword [esp + 0x60], eax
call fcn.00427770
push ecx
lea edx, [esp + 0x60]
fstp dword [esp]
push edx
mov ecx, esi
call fcn.00427770
push ecx
fstp dword [esp]
push 6
push edi
mov ecx, ebp
call ebx
inc edi
mov dword [esp + 0x14], 0
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x60]
mov dword [esp + 0x44], ecx
push edx
mov ecx, esi
mov dword [esp + 0x64], eax
call fcn.00427770
lea eax, [esp + 0x44]
push ecx
fstp dword [esp]
push eax
mov ecx, esi
call fcn.00427770
push ecx
fstp dword [esp]
push 6
push edi
mov ecx, ebp
call ebx
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], ecx
inc edi
lea ecx, [esp + 0x104]
mov byte [esp + 0x260], 1
call fcn.0056f230
lea ecx, [esp + 0x130]
call fcn.0056dbf0
mov eax, dword [esp + 0x13c]
cmp eax, dword [esp + 0x140]
jbe 0x40eb60
mov ecx, dword [esp + 0x70]
push ebp
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBElement::Add2DShape_class_BMB2DGeometry__]
lea ecx, [esp + 0x130]
mov dword [esp + 0x260], 0xffffffff
call fcn.0056cc30
mov eax, 1
mov ecx, dword [esp + 0x258]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x240]
xor ecx, esp
call fcn.005f617e
add esp, 0x250
ret 0xc