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

Disassembly:
push 0xffffffffffffffff
push 0x6116d5
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x682d00]
xor eax, esp
mov dword [esp + 0x240], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x682d00]
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.0040c220
cmp eax, 0xffffffff
jne 0x40e6af
xor eax, eax
jmp 0x40ef55
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 0x40e6e2
mov ecx, ebp
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::constructor_void_]
mov dword [ebp], vtable.BMB2DGeometry.0
jmp 0x40e6e4
xor ebp, ebp
push 0xffffffffffffffff
mov ecx, edi
mov dword [esp + 0x264], 0xffffffff
mov byte [ebp + 8], 3
call fcn.005636b0
lea edx, [esp + 0x14]
push edx
mov ecx, esi
mov dword [esp + 0x18], eax
call fcn.0042ac80
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 0x40e726
jmp 0x40e735
cmp al, 2
jne 0x40e72c
jmp 0x40e735
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.0042ac80
push ecx
lea ecx, [esp + 0x20]
fstp dword [esp]
push ecx
mov ecx, esi
call fcn.0042ac80
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.0042ac80
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.0055f620
mov edx, dword [esp + 0x18]
push edx
lea ecx, [esp + 0x134]
call fcn.00570df0
lea ecx, [esp + 0x130]
mov dword [esp + 0x260], 1
call fcn.005710a0
lea ecx, [esp + 0x130]
call fcn.005712e0
cmp eax, 0x20
jne 0x40e852
mov eax, dword [esp + 0x150]
push eax
lea ecx, [esp + 0xc8]
call fcn.0057fd90
lea ecx, [esp + 0xa0]
push ecx
lea ecx, [esp + 0xc8]
mov byte [esp + 0x264], 2
call fcn.0057fe60
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.0057fe30
lea ecx, [esp + 0x130]
mov dword [esp + 0x14], 1
call fcn.005710a0
mov ecx, dword [esp + 0x13c]
cmp ecx, dword [esp + 0x140]
ja 0x40ef2e
lea ebx, [ebx]
lea ecx, [esp + 0x130]
call fcn.005712e0
cmp eax, 0x20
je 0x40ef0e
lea ecx, [esp + 0x130]
call fcn.005712e0
cmp eax, 0x11
je 0x40e9c4
cmp eax, 0x16
jne 0x40ef0e
mov edx, dword [esp + 0x150]
push edx
lea ecx, [esp + 0xc8]
call fcn.0057ca40
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 0x40e90a
cmp dword [esp + 0x2c], ecx
jne 0x40e90a
lea ecx, [esp + 0xc4]
mov byte [esp + 0x260], 1
call fcn.0057ca70
jmp 0x40ef0e
cmp dword [esp + 0x14], 1
jne 0x40e95d
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.0042ac80
push ecx
lea eax, [esp + 0x6c]
fstp dword [esp]
push eax
mov ecx, esi
call fcn.0042ac80
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.0042ac80
push ecx
lea ecx, [esp + 0x84]
fstp dword [esp]
push ecx
mov ecx, esi
call fcn.0042ac80
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.0057ca70
jmp 0x40ef0e
mov ecx, dword [esp + 0x150]
push ecx
lea ecx, [esp + 0x108]
call fcn.00576e40
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 0x40ebd9
cmp dword [esp + 0x110], eax
jne 0x40ea54
cmp edx, ecx
jne 0x40ea54
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.0042ac80
fld dword [esi + 0x154]
fcompp
fnstsw ax
test ah, 0x41
je 0x40eefa
lea ecx, [esp + 0x30]
call fcn.005f1fa0
fild dword [esi + 0x158]
push 1
sub esp, 8
fdivr qword [0x632608]
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x110]
mov byte [esp + 0x26c], 5
fstp qword [esp]
push eax
call fcn.0051f630
cmp dword [esp + 0x14], 1
jne 0x40eb0b
cmp dword [esp + 0x30], 0
jle 0x40ea9e
mov eax, dword [esp + 0x38]
jmp 0x40eaa9
push 0
lea ecx, [esp + 0x34]
call fcn.005ee880
cmp dword [esp + 0x30], 0
mov ecx, dword [eax + 4]
mov dword [esp + 0x88], ecx
jle 0x40eac0
mov eax, dword [esp + 0x38]
jmp 0x40eacb
push 0
lea ecx, [esp + 0x34]
call fcn.005ee880
mov edx, dword [eax]
lea eax, [esp + 0x88]
push eax
mov ecx, esi
mov dword [esp + 0x94], edx
call fcn.0042ac80
push ecx
lea ecx, [esp + 0x94]
fstp dword [esp]
push ecx
mov ecx, esi
call fcn.0042ac80
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 0x40ebb3
jmp 0x40eb26
mov ecx, dword [esp + 0x18]
cmp ecx, edx
jge 0x40eb33
mov eax, dword [esp + 0x38]
lea eax, [eax + ecx*8]
jmp 0x40eb45
push ecx
lea ecx, [esp + 0x34]
call fcn.005ee880
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x18]
cmp ecx, edx
mov eax, dword [eax + 4]
mov dword [esp + 0x98], eax
jge 0x40eb5c
mov edx, dword [esp + 0x38]
lea eax, [edx + ecx*8]
jmp 0x40eb66
push ecx
lea ecx, [esp + 0x34]
call fcn.005ee880
mov eax, dword [eax]
lea ecx, [esp + 0x98]
push ecx
mov ecx, esi
mov dword [esp + 0xb8], eax
call fcn.0042ac80
push ecx
lea edx, [esp + 0xb8]
fstp dword [esp]
push edx
mov ecx, esi
call fcn.0042ac80
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 0x40eb22
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.005f1f90
jmp 0x40eefa
cmp dword [esp + 0x110], eax
jne 0x40ed7e
cmp dword [esp + 0x114], ecx
jne 0x40ed7e
lea edx, [esp + 0xbc]
mov dword [esp + 0xbc], ecx
push edx
mov ecx, esi
mov dword [esp + 0x68], eax
call fcn.0042ac80
push ecx
lea eax, [esp + 0x68]
fstp dword [esp]
push eax
mov ecx, esi
call fcn.0042ac80
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.0051c850
push eax
lea ecx, [esp + 0xa4]
call fcn.005eeba0
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.0042ac80
push ecx
lea edx, [esp + 0x70]
fstp dword [esp]
push edx
mov ecx, esi
call fcn.0042ac80
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.0042ac80
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.0051dfc0
fstp dword [esp + 0x18]
mov eax, dword [esp + 0x124]
and eax, 0xfffffff9
cmp ax, 1
jne 0x40ecf8
fld dword [esp + 0x18]
fmul qword [0x631e00]
fstp dword [esp + 0x18]
lea ecx, [esp + 0xec]
push ecx
lea ecx, [esp + 0x108]
call fcn.0051b3c0
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.0042ac80
push ecx
lea edx, [esp + 0xac]
fstp dword [esp]
push edx
mov ecx, esi
call fcn.0042ac80
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 0x40eef9
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0x108]
call fcn.0051f3d0
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x40]
cmp ecx, dword [esp + 0x3c]
jne 0x40eda7
cmp dword [esp + 0x54], eax
je 0x40ee69
cmp ecx, dword [esp + 0x20]
jne 0x40edbb
mov ecx, dword [esp + 0x54]
cmp ecx, dword [esp + 0x24]
je 0x40ee69
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.0042ac80
push ecx
lea ecx, [esp + 0xbc]
fstp dword [esp]
push ecx
mov ecx, esi
call fcn.0042ac80
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.0042ac80
push ecx
lea edx, [esp + 0xc4]
fstp dword [esp]
push edx
mov ecx, esi
call fcn.0042ac80
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.0042ac80
lea eax, [esp + 0xb0]
jmp 0x40eed2
cmp dword [esp + 0x14], 1
jne 0x40eeb2
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.0042ac80
push ecx
lea edx, [esp + 0x60]
fstp dword [esp]
push edx
mov ecx, esi
call fcn.0042ac80
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.0042ac80
lea eax, [esp + 0x44]
push ecx
fstp dword [esp]
push eax
mov ecx, esi
call fcn.0042ac80
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.00572710
lea ecx, [esp + 0x130]
call fcn.005710d0
mov eax, dword [esp + 0x13c]
cmp eax, dword [esp + 0x140]
jbe 0x40e880
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.00570110
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.005f9aee
add esp, 0x250
ret 0xc