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

Disassembly:
push 0xffffffffffffffff
push 0x61323e
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x685e38]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x685e38]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov eax, dword [esp + 0x84]
mov ebp, dword [esp + 0x80]
mov edi, ecx
push eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x20], ebp
call fcn.00520c30
cmp dword [esp + 0x88], 1
mov dword [esp + 0x78], 0
jne 0x40be0b
mov eax, dword [esp + 0x38]
lea ecx, [eax + eax]
lea edx, [esp + 0x18]
mov dword [esp + 0x18], ecx
push edx
mov ecx, edi
call fcn.0042afc0
fld dword [edi + 0x154]
fcompp
fnstsw ax
test ah, 0x41
je 0x40beda
mov eax, dword [esp + 0x38]
fld qword [0x634610]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
add ecx, eax
sub esp, 8
mov eax, esp
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], edx
fstp qword [eax]
mov dword [esp + 0x1c], esp
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x58]
call fcn.0051c130
lea ecx, [esp + 0x20]
mov byte [esp + 0x78], 1
call fcn.005f3af0
fild dword [edi + 0x158]
push 1
sub esp, 8
fdivr qword [0x634610]
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x54]
mov byte [esp + 0x84], 2
fstp qword [esp]
push edx
call fcn.00520710
push 0x1c
mov ebx, eax
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov ebp, eax
add esp, 4
mov dword [esp + 0x14], ebp
mov byte [esp + 0x78], 3
test ebp, ebp
je 0x40bd4e
mov ecx, ebp
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::constructor_void_]
mov dword [ebp], vtable.BMB2DGeometry.0
jmp 0x40bd50
xor ebp, ebp
fldz
push ebx
mov ecx, ebp
fstp dword [ebp + 0xc]
mov byte [esp + 0x7c], 2
mov byte [ebp + 8], 4
mov dword [ebp + 0x10], ebx
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::AllocateGeUnitArray_int_]
xor esi, esi
test ebx, ebx
jle 0x40bddf
cmp esi, dword [esp + 0x20]
jge 0x40bd7f
mov eax, dword [esp + 0x28]
lea eax, [eax + esi*8]
jmp 0x40bd89
push esi
lea ecx, [esp + 0x24]
call fcn.005effb0
cmp esi, dword [esp + 0x20]
mov ecx, dword [eax + 4]
mov dword [esp + 0x18], ecx
jge 0x40bd9f
mov edx, dword [esp + 0x28]
lea eax, [edx + esi*8]
jmp 0x40bda9
push esi
lea ecx, [esp + 0x24]
call fcn.005effb0
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push ecx
mov ecx, edi
mov dword [esp + 0x18], eax
call fcn.0042afc0
push ecx
lea edx, [esp + 0x18]
fstp dword [esp]
push edx
mov ecx, edi
call fcn.0042afc0
push ecx
fstp dword [esp]
push 6
push esi
mov ecx, ebp
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::PutGeUnit_int__unsigned_char__float__float_]
inc esi
cmp esi, ebx
jl 0x40bd70
mov ecx, dword [esp + 0x1c]
push ebp
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBElement::Add2DShape_class_BMB2DGeometry__]
lea ecx, [esp + 0x20]
mov byte [esp + 0x78], 1
call fcn.005f3b00
lea ecx, [esp + 0x48]
mov byte [esp + 0x78], 0
call fcn.0051c420
jmp 0x40beda
push 0x1c
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
mov dword [esp + 0x1c], esi
mov byte [esp + 0x78], 4
test esi, esi
je 0x40be34
mov ecx, esi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::constructor_void_]
mov dword [esi], vtable.BMB2DGeometry.0
jmp 0x40be36
xor esi, esi
fldz
push 2
mov ecx, esi
fstp dword [esi + 0xc]
mov byte [esp + 0x7c], 0
mov byte [esi + 8], 6
mov dword [esi + 0x10], 2
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::AllocateGeUnitArray_int_]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x1c]
mov dword [esp + 0x14], ecx
push edx
mov ecx, edi
mov dword [esp + 0x20], eax
call fcn.0042afc0
push ecx
lea eax, [esp + 0x18]
fstp dword [esp]
push eax
mov ecx, edi
call fcn.0042afc0
mov ebx, dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DGeometry::PutGeUnit_int__unsigned_char__float__float_]
push ecx
fstp dword [esp]
push 7
push 0
mov ecx, esi
call ebx
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
lea edx, [ecx + ecx]
lea ecx, [eax + eax]
mov dword [esp + 0x14], edx
lea edx, [esp + 0x14]
mov dword [esp + 0x18], ecx
push edx
mov ecx, edi
call fcn.0042afc0
push ecx
lea eax, [esp + 0x1c]
fstp dword [esp]
push eax
mov ecx, edi
call fcn.0042afc0
push ecx
fstp dword [esp]
push 1
push 1
mov ecx, esi
call ebx
push esi
mov ecx, ebp
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBElement::Add2DShape_class_BMB2DGeometry__]
lea ecx, [esp + 0x2c]
mov dword [esp + 0x78], 0xffffffff
call fcn.00520c60
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.005fb9ce
add esp, 0x68
ret 0xc