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

Disassembly:
push 0xffffffffffffffff
push 0x61165a
mov eax, dword fs:[0]
push eax
sub esp, 0x220
mov eax, dword [0x682d00]
xor eax, esp
mov dword [esp + 0x21c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x682d00]
xor eax, esp
push eax
lea eax, [esp + 0x234]
mov dword fs:[0], eax
mov esi, dword [esp + 0x244]
push 0
push esi
mov edi, ecx
call fcn.0040c220
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40e04a
xor eax, eax
jmp 0x40e613
push 0x1c
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov ebp, eax
add esp, 4
mov dword [esp + 0x34], ebp
mov dword [esp + 0x23c], 0
test ebp, ebp
je 0x40e07a
mov ecx, ebp
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::constructor_void_]
mov dword [ebp], vtable.BMB2DGeometry.0
jmp 0x40e07c
xor ebp, ebp
fldz
push ebx
mov ecx, ebp
fstp dword [ebp + 0xc]
mov dword [esp + 0x240], 0xffffffff
mov byte [ebp + 8], 2
mov dword [ebp + 0x10], ebx
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::AllocateGeUnitArray_int_]
lea eax, [esp + 0x20]
push eax
mov ecx, esi
call fcn.0055f620
push esi
lea ecx, [esp + 0x110]
call fcn.00570df0
mov ebx, 1
lea ecx, [esp + 0x10c]
mov dword [esp + 0x23c], ebx
call fcn.005710a0
lea ecx, [esp + 0x10c]
call fcn.005712e0
cmp eax, 0x20
jne 0x40e12e
mov ecx, dword [esp + 0x12c]
push ecx
lea ecx, [esp + 0xa4]
call fcn.0057fd90
lea edx, [esp + 0x84]
push edx
lea ecx, [esp + 0xa4]
mov byte [esp + 0x240], 2
call fcn.0057fe60
mov ecx, dword [eax]
mov dword [esp + 0x20], ecx
mov edx, dword [eax + 4]
lea ecx, [esp + 0xa0]
mov dword [esp + 0x24], edx
mov byte [esp + 0x23c], bl
call fcn.0057fe30
lea ecx, [esp + 0x10c]
xor esi, esi
mov dword [esp + 0x28], ebx
call fcn.005710a0
mov eax, dword [esp + 0x118]
cmp eax, dword [esp + 0x11c]
ja 0x40e5fa
mov ebx, dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::PutGeUnit_int__unsigned_char__float__float_]
lea ebx, [ebx]
lea ecx, [esp + 0x10c]
call fcn.005712e0
cmp eax, 0x20
je 0x40e5da
lea ecx, [esp + 0x10c]
call fcn.005712e0
cmp eax, 0x11
je 0x40e29e
cmp eax, 0x16
jne 0x40e5da
mov ecx, dword [esp + 0x12c]
push ecx
lea ecx, [esp + 0xa4]
call fcn.0057ca40
mov eax, dword [esp + 0xac]
mov ecx, dword [esp + 0xb0]
mov byte [esp + 0x23c], 3
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
cmp dword [esp + 0x20], eax
jne 0x40e1ea
cmp dword [esp + 0x24], ecx
jne 0x40e1ea
lea ecx, [esp + 0xa0]
mov byte [esp + 0x23c], 1
call fcn.0057ca70
jmp 0x40e5da
cmp dword [esp + 0x28], 1
jne 0x40e23d
mov edx, dword [esp + 0xa8]
mov eax, dword [esp + 0xa4]
lea ecx, [esp + 0x9c]
push ecx
mov ecx, edi
mov dword [esp + 0xa0], edx
mov dword [esp + 0x58], eax
call fcn.0042ac80
push ecx
lea edx, [esp + 0x58]
fstp dword [esp]
push edx
mov ecx, edi
call fcn.0042ac80
push ecx
fstp dword [esp]
push 6
push esi
mov ecx, ebp
call ebx
inc esi
mov dword [esp + 0x28], 0
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x5c]
mov dword [esp + 0x64], ecx
push edx
mov ecx, edi
mov dword [esp + 0x60], eax
call fcn.0042ac80
push ecx
lea eax, [esp + 0x68]
fstp dword [esp]
push eax
mov ecx, edi
call fcn.0042ac80
push ecx
fstp dword [esp]
push 6
push esi
mov ecx, ebp
call ebx
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0xa0]
mov dword [esp + 0x24], edx
inc esi
mov byte [esp + 0x23c], 1
call fcn.0057ca70
jmp 0x40e5da
mov eax, dword [esp + 0x12c]
push eax
lea ecx, [esp + 0xe4]
call fcn.00576e40
mov edx, dword [esp + 0xec]
mov eax, dword [esp + 0xe4]
mov ecx, dword [esp + 0xe8]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0xf0]
mov byte [esp + 0x23c], 4
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x1c], edx
cmp dword [esp + 0xec], eax
jne 0x40e456
cmp edx, ecx
jne 0x40e456
mov dword [esp + 0x74], eax
lea eax, [esp + 0x6c]
mov dword [esp + 0x6c], ecx
push eax
mov ecx, edi
call fcn.0042ac80
push ecx
lea ecx, [esp + 0x78]
fstp dword [esp]
push ecx
mov ecx, edi
call fcn.0042ac80
push ecx
fstp dword [esp]
push 6
push esi
mov ecx, ebp
call ebx
lea edx, [esp + 0xd0]
push edx
lea ecx, [esp + 0xe4]
inc esi
call fcn.0051c850
push eax
lea ecx, [esp + 0x88]
call fcn.005eeba0
mov ecx, dword [esp + 0x84]
mov eax, dword [esp + 0x88]
lea edx, [esp + 0x7c]
mov dword [esp + 0x50], ecx
push edx
mov ecx, edi
mov dword [esp + 0x80], eax
call fcn.0042ac80
push ecx
lea eax, [esp + 0x54]
fstp dword [esp]
push eax
mov ecx, edi
call fcn.0042ac80
push ecx
fstp dword [esp]
push 3
push esi
mov ecx, ebp
call ebx
mov ecx, dword [esp + 0xfc]
lea edx, [ecx + ecx]
lea eax, [esp + 0x80]
push eax
mov ecx, edi
inc esi
mov dword [esp + 0x84], edx
call fcn.0042ac80
fstp dword [esp + 0x14]
fldz
sub esp, 8
fstp dword [esp + 4]
mov ecx, ebp
fld dword [esp + 0x1c]
fstp dword [esp]
push 1
push esi
call ebx
lea ecx, [esp + 0xe0]
inc esi
call fcn.0051dfc0
fstp dword [esp + 0x14]
mov ecx, dword [esp + 0x100]
and ecx, 0xfffffff9
cmp cx, 1
jne 0x40e3f7
fld dword [esp + 0x14]
fmul qword [0x631e00]
fstp dword [esp + 0x14]
lea edx, [esp + 0xc8]
push edx
lea ecx, [esp + 0xe4]
call fcn.0051b3c0
fld qword [eax]
fld dword [esp + 0x14]
sub esp, 8
fstp dword [esp + 4]
mov ecx, ebp
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fstp dword [esp]
push 5
push esi
call ebx
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x58]
mov dword [esp + 0x90], ecx
push edx
mov ecx, edi
inc esi
mov dword [esp + 0x5c], eax
call fcn.0042ac80
lea eax, [esp + 0x90]
jmp 0x40e59e
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0xe4]
call fcn.0051f3d0
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
cmp ecx, dword [esp + 0x2c]
jne 0x40e47f
cmp dword [esp + 0x3c], eax
je 0x40e535
cmp ecx, dword [esp + 0x18]
jne 0x40e493
mov ecx, dword [esp + 0x3c]
cmp ecx, dword [esp + 0x1c]
je 0x40e535
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x60], eax
lea eax, [esp + 0x60]
push eax
mov ecx, edi
mov dword [esp + 0x2c], 1
mov dword [esp + 0x90], edx
call fcn.0042ac80
push ecx
lea ecx, [esp + 0x90]
fstp dword [esp]
push ecx
mov ecx, edi
call fcn.0042ac80
push ecx
fstp dword [esp]
push 0xd
push esi
mov ecx, ebp
call ebx
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x68]
push ecx
mov ecx, edi
inc esi
mov dword [esp + 0x6c], edx
mov dword [esp + 0x4c], eax
call fcn.0042ac80
push ecx
lea edx, [esp + 0x4c]
fstp dword [esp]
push edx
mov ecx, edi
call fcn.0042ac80
push ecx
fstp dword [esp]
push 6
push esi
mov ecx, ebp
call ebx
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x70]
mov dword [esp + 0x98], ecx
push edx
mov ecx, edi
inc esi
mov dword [esp + 0x74], eax
call fcn.0042ac80
lea eax, [esp + 0x98]
jmp 0x40e59e
cmp dword [esp + 0x28], 1
jne 0x40e57e
lea ecx, [esp + 0x78]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x2c]
push ecx
mov ecx, edi
mov dword [esp + 0x98], eax
call fcn.0042ac80
push ecx
lea edx, [esp + 0x98]
fstp dword [esp]
push edx
mov ecx, edi
call fcn.0042ac80
push ecx
fstp dword [esp]
push 6
push esi
mov ecx, ebp
call ebx
inc esi
mov dword [esp + 0x28], 0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x4c]
mov dword [esp + 0x34], ecx
push edx
mov ecx, edi
mov dword [esp + 0x50], eax
call fcn.0042ac80
lea eax, [esp + 0x34]
push ecx
fstp dword [esp]
push eax
mov ecx, edi
call fcn.0042ac80
push ecx
fstp dword [esp]
push 6
push esi
mov ecx, ebp
call ebx
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0xe0]
inc esi
mov dword [esp + 0x24], edx
mov byte [esp + 0x23c], 1
call fcn.00572710
lea ecx, [esp + 0x10c]
call fcn.005710d0
mov eax, dword [esp + 0x118]
cmp eax, dword [esp + 0x11c]
jbe 0x40e160
lea ecx, [esp + 0x10c]
mov dword [esp + 0x23c], 0xffffffff
call fcn.00570110
mov eax, ebp
mov ecx, dword [esp + 0x234]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.005f9aee
add esp, 0x22c
ret 4