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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x611570
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
push ebx
push esi
push edi
mov eax, dword [0x682d00]
xor eax, esp
push eax
lea eax, [esp + 0xd8]
mov dword fs:[0], eax
mov ebx, ecx
mov ecx, dword [0x683034]
push 0
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMBSheet____thiscall_BMBProduct::GetSheet_int_]
mov edi, eax
mov dword [esp + 0x54], edi
test edi, edi
jne 0x40d016
xor eax, eax
mov ecx, dword [esp + 0xd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x683034]
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMBMapPad____thiscall_BMBProduct::GetMapPad_void_]
test eax, eax
je 0x40cffc
mov eax, dword [ebx + 0x54]
push eax
lea ecx, [esp + 0x60]
call fcn.00475a10
lea ecx, [esp + 0x5c]
mov dword [ebx + 0x2e0], 0
call fcn.0048b120
mov eax, dword [esp + 0x64]
test eax, eax
je 0x40d6c8
sub esp, 0xc
mov esi, eax
mov eax, dword [eax + 0x34]
mov ecx, esp
mov dword [esp + 0x48], esp
push eax
call fcn.005ec6d0
mov ecx, ebx
call fcn.0040b480
dec eax
push eax
mov ecx, edi
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMBNet____thiscall_BMBSheet::GetNet_int_]
mov dword [esp + 0x3c], eax
test eax, eax
je 0x40d6b3
push esi
lea ecx, [esp + 0x2c]
call fcn.00475a60
lea ecx, [esp + 0x28]
mov dword [esp + 0xe0], 0
call fcn.00475a80
lea ecx, [esp + 0x28]
call fcn.004baa40
test eax, eax
je 0x40d69f
lea ecx, [esp + 0x28]
call fcn.004baa40
test eax, eax
je 0x40d681
push eax
lea ecx, [esp + 0x34]
call fcn.00475ac0
lea ecx, [esp + 0x30]
mov byte [esp + 0xe0], 1
call fcn.00475ae0
lea ecx, [esp + 0x30]
call fcn.004baa40
test eax, eax
je 0x40d670
lea ecx, [esp + 0x30]
call fcn.004baa40
test eax, eax
je 0x40d656
mov ecx, eax
call fcn.004afd30
mov esi, eax
test esi, esi
je 0x40d656
mov ecx, esi
call fcn.00479f10
test eax, eax
je 0x40d656
mov edx, dword [esi]
mov eax, dword [edx + 0x38]
mov ecx, esi
call eax
mov edi, eax
mov ecx, esi
mov dword [esp + 0x1c], edi
call fcn.00479f10
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x3c]
call eax
mov ecx, 1
cmp dword [ebx + 0x270], ecx
jne 0x40d162
cmp eax, 0xce
je 0x40d656
cmp eax, 0xcd
je 0x40d656
cmp dword [ebp + 8], ecx
jne 0x40d178
push esi
mov ecx, ebx
call fcn.0040c5b0
cmp eax, 1
je 0x40d656
cmp edi, 0xe
je 0x40d186
cmp edi, 0xf
jne 0x40d656
xor eax, eax
push 0xb0
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], eax
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
add esp, 4
mov dword [esp + 0x20], edi
mov byte [esp + 0xe0], 2
test edi, edi
je 0x40d1d5
mov ecx, dword [0x68303c]
push 1
push 0
push ecx
mov ecx, edi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DStack::constructor_int__unsigned_char__unsigned_char_]
mov dword [edi], vtable.BMB2DStack.1.0
mov dword [edi + 0x6c], vtable.BMB2DStack.0
mov dword [esp + 0x14], edi
jmp 0x40d1e1
mov dword [esp + 0x14], 0
mov edi, dword [esp + 0x14]
push 0x631c94
lea ecx, [esp + 0x9c]
mov byte [esp + 0xe4], 1
call fcn.005ec6d0
mov eax, dword [esp + 0x1c]
inc dword [0x68303c]
mov byte [esp + 0xe0], 3
cmp eax, 0xe
je 0x40d21a
cmp eax, 0xf
jne 0x40d51d
lea ecx, [esp + 0x80]
call fcn.005f1fa0
lea ecx, [esp + 0x74]
mov byte [esp + 0xe0], 4
call fcn.005f1fa0
mov edx, dword [esi]
mov eax, dword [edx + 0x38]
mov ecx, esi
mov byte [esp + 0xe0], 5
call eax
cmp eax, 0xf
jne 0x40d26e
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x88]
push eax
mov ecx, esi
mov dword [esp + 0x24], 0
call fcn.004be360
mov ecx, esi
call fcn.004c0690
mov ecx, eax
call fcn.004b90c0
mov ecx, dword [ebx + 0x34]
push 0
push eax
call fcn.004afd30
mov ecx, eax
call fcn.004b71c0
test byte [eax + 0x20], 1
mov ecx, edi
je 0x40d29a
push 0
jmp 0x40d29c
push 1
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DStack::PutPlated_unsigned_char_]
mov edx, dword [esi]
mov eax, dword [edx + 0x7c]
mov ecx, esi
call eax
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
push ecx
mov ecx, edi
fstp dword [esp]
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DStack::PutRotation_float_]
lea ecx, [esp + 0xb0]
push ecx
mov ecx, esi
call fcn.004c0690
mov ecx, eax
call fcn.004b9390
mov ecx, dword [eax + 4]
mov eax, dword [eax]
push ecx
push eax
lea ecx, [esp + 0xa0]
mov byte [esp + 0xe8], 6
call fcn.005ebda0
lea ecx, [esp + 0xb0]
mov byte [esp + 0xe0], 5
call fcn.005ebd80
movzx eax, word [esi + 0x5c]
movzx edx, ax
movzx eax, word [esi + 0x5e]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x2d8]
mov dword [esp + 0x24], edx
cmp eax, 2
je 0x40d327
cmp eax, 4
jne 0x40d337
mov ecx, edi
call dword [sym.imp.BMB_NX_C9.dll_public:_unsigned_char___thiscall_BMB2DStack::GetPlated_void_]
cmp al, 1
je 0x40d4e0
mov edx, dword [esi]
mov eax, dword [edx + 0xe0]
mov ecx, esi
call eax
test eax, eax
je 0x40d4e0
mov edx, dword [esi]
mov edx, dword [edx + 0xf4]
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
mov dword [esp + 0x20], 0
call edx
lea ecx, [esp + 0x68]
call fcn.005f1fa0
mov ecx, dword [ebx + 0x48]
push 3
mov byte [esp + 0xe4], 7
call fcn.004e1bd0
test eax, eax
je 0x40d4cf
push 0
push 0
lea ecx, [esp + 0x70]
push ecx
push eax
lea ecx, [ebx + 0x100]
call fcn.00406800
test eax, eax
je 0x40d4cf
mov edx, dword [esp + 0x1c]
push edx
mov ecx, ebx
call fcn.0040bf20
cmp eax, 1
jne 0x40d4cf
cmp byte [ebx + 0x2a5], al
jne 0x40d4cf
mov eax, dword [esp + 0x70]
mov ecx, dword [eax]
push 0x7c
mov dword [esp + 0x24], ecx
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
add esp, 4
mov dword [esp + 0x40], edi
mov byte [esp + 0xe0], 8
test edi, edi
je 0x40d409
mov edx, dword [0x68303c]
push edx
mov ecx, edi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBHole::constructor_int_]
mov dword [edi], vtable.BMBHole.1.0
mov dword [edi + 0x6c], vtable.BMBHole.0
jmp 0x40d40b
xor edi, edi
inc dword [0x68303c]
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, esi
mov byte [esp + 0xe0], 7
call edx
fstp dword [esp + 0x50]
xor eax, eax
push eax
lea ecx, [esp + 0x90]
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], eax
call fcn.005ebcb0
mov edx, dword [esi]
mov edx, dword [edx + 0x5c]
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0xd0]
push eax
mov ecx, esi
mov byte [esp + 0xe8], 9
call edx
mov edx, dword [esp + 0x20]
push eax
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x54]
push ecx
push edx
lea eax, [esp + 0xa0]
push eax
push edi
mov ecx, ebx
call fcn.0041c920
lea ecx, [esp + 0x8c]
mov byte [esp + 0xe0], 7
call fcn.005ebd80
mov ecx, dword [esp + 0x20]
push ecx
mov ecx, edi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBSymbol::PutLayerNumber_short_int_]
mov eax, dword [ebx + 0x278]
cmp eax, 1
je 0x40d4c4
mov ecx, dword [esp + 0x14]
cmp eax, 2
jne 0x40d4ba
call dword [sym.imp.BMB_NX_C9.dll_public:_unsigned_char___thiscall_BMB2DStack::GetPlated_void_]
test al, al
jmp 0x40d4c2
call dword [sym.imp.BMB_NX_C9.dll_public:_unsigned_char___thiscall_BMB2DStack::GetPlated_void_]
cmp al, 1
jne 0x40d4cf
mov ecx, dword [esp + 0x14]
push edi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMB2DStack::PutHole_class_BMBHole__]
lea ecx, [esp + 0x68]
mov byte [esp + 0xe0], 5
call fcn.005f1f90
lea ecx, [esp + 0xa4]
call fcn.005f1fa0
lea ecx, [esp + 0xa4]
call fcn.005f1f90
lea ecx, [esp + 0x74]
mov byte [esp + 0xe0], 4
call fcn.005f1f90
lea ecx, [esp + 0x80]
mov byte [esp + 0xe0], 3
call fcn.005f1f90
mov edx, dword [ebx + 0x48]
mov eax, dword [edx + 0x30]
dec eax
cmp dword [esp + 0x24], 0
movzx eax, ax
jne 0x40d53a
cwde
mov byte [esp + 0x38], 1
cmp dword [esp + 0x18], eax
je 0x40d53f
mov byte [esp + 0x38], 2
mov edx, dword [esi]
mov edx, dword [edx + 0x5c]
lea eax, [esp + 0xc4]
push eax
mov ecx, esi
call edx
mov eax, dword [eax]
lea ecx, [esp + 0x58]
push ecx
mov ecx, ebx
mov dword [esp + 0x5c], eax
call fcn.0042ac80
fstp dword [esp + 0x1c]
mov edx, dword [esi]
mov edx, dword [edx + 0x5c]
lea eax, [esp + 0xbc]
push eax
mov ecx, esi
call edx
mov eax, dword [eax + 4]
lea ecx, [esp + 0x44]
push ecx
mov ecx, ebx
mov dword [esp + 0x48], eax
call fcn.0042ac80
fstp dword [esp + 0x20]
push 0x8c
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
add esp, 4
mov dword [esp + 0x40], edi
mov byte [esp + 0xe0], 0xa
test edi, edi
je 0x40d5df
fld dword [esp + 0x20]
mov edx, dword [0x68303c]
push 0
sub esp, 8
fstp dword [esp + 4]
mov ecx, edi
fld dword [esp + 0x28]
fstp dword [esp]
push edx
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBVia::constructor_int__float__float__class_BMB2DStack__]
mov dword [edi], vtable.BMBVia.1.0
mov dword [edi + 0x6c], vtable.BMBVia.0
jmp 0x40d5e1
xor edi, edi
mov eax, dword [esp + 0x14]
push eax
mov ecx, edi
mov byte [esp + 0xe4], 3
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBVia::PutStack_class_BMB2DStack__]
mov ecx, dword [esp + 0x38]
push ecx
mov ecx, edi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBVia::PutViaType_unsigned_char_]
mov edx, dword [esp + 0x24]
inc edx
push edx
mov ecx, edi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBVia::PutTopLayerNumber_short_int_]
mov eax, dword [esp + 0x18]
inc eax
push eax
mov ecx, edi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBVia::PutBottomLayerNumber_short_int_]
push edi
mov edi, dword [esp + 0x40]
mov ecx, edi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBNet::AddVia_class_BMBVia__]
mov ecx, dword [0x68303c]
push ecx
push edi
push esi
mov ecx, ebx
call fcn.0040ca40
inc dword [0x68303c]
lea ecx, [esp + 0x98]
mov byte [esp + 0xe0], 1
call fcn.005ebd80
lea ecx, [esp + 0x30]
call fcn.00475af0
lea ecx, [esp + 0x30]
call fcn.004baa40
test eax, eax
jne 0x40d0ef
lea ecx, [esp + 0x30]
mov byte [esp + 0xe0], 0
call fcn.0051a4a0
lea ecx, [esp + 0x28]
call fcn.00475a90
lea ecx, [esp + 0x28]
call fcn.004baa40
test eax, eax
jne 0x40d0b2
mov edi, dword [esp + 0x54]
lea ecx, [esp + 0x28]
mov dword [esp + 0xe0], 0xffffffff
call fcn.0051a4a0
lea ecx, [esp + 0x5c]
call fcn.004a8cd0
mov eax, dword [esp + 0x64]
test eax, eax
jne 0x40d052
mov eax, 1
mov ecx, dword [esp + 0xd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4