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

Disassembly:
push 0xffffffffffffffff
push 0x6117eb
mov eax, dword fs:[0]
push eax
sub esp, 0x98
push ebx
push ebp
push esi
push edi
mov eax, dword [0x682d00]
xor eax, esp
push eax
lea eax, [esp + 0xac]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x20], ebx
mov ebp, dword [esp + 0xc0]
mov eax, dword [ebp + 0x10]
xor esi, esi
cmp eax, esi
je 0x40f88c
push 1
mov ecx, ebp
call fcn.0053ffa0
cmp eax, 1
jne 0x40f45c
lea ecx, [esp + 0x14]
call fcn.00516940
push esi
lea ecx, [esp + 0x18]
mov dword [esp + 0xb8], esi
call fcn.005f1b40
push 1
lea eax, [esp + 0x18]
push eax
mov ecx, ebp
mov dword [esp + 0x1c], esi
call fcn.00540590
mov eax, dword [esp + 0x14]
cmp eax, 1
jle 0x40f344
mov edi, dword [esp + 0xbc]
mov esi, dword [sym.imp.BMB_NX_C9.dll_public:_unsigned_char___thiscall_BMBElement::GetKind_void_]
mov ecx, edi
call esi
cmp al, 0x15
je 0x40f183
mov ecx, edi
call esi
cmp al, 0x10
jne 0x40f336
push 0x631c94
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90.dll_Ordinal_310]
mov ecx, edi
mov byte [esp + 0xb4], 1
call esi
cmp al, 0x15
jne 0x40f1b3
push str.BOARD_FIGURE
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90.dll_Ordinal_820]
jmp 0x40f219
mov ecx, edi
call esi
cmp al, 0x10
jne 0x40f219
mov ecx, edi
call dword [sym.imp.BMB_NX_C9.dll_public:_short_int___thiscall_BMBSymbol::GetLayerNumber_void_]
movsx ebx, ax
test ebx, ebx
jle 0x40f219
mov ecx, dword [0x683034]
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMBTableLayer____thiscall_BMBProduct::GetTableLayer_void_]
mov esi, eax
dec ebx
push ebx
mov ecx, esi
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMBLayer____thiscall_BMBTableLayer::GetRecord_int_]
test eax, eax
je 0x40f219
push esi
lea ecx, [esp + 0x30]
push ecx
mov ecx, eax
call dword [sym.imp.BMB_NX_C9.dll_public:_class_ATL::CStringT_char__class_StrTraitMFC_DLL_char__class_ATL::ChTraitsCRT_char______thiscall_BMBLayer::UniqueName_class_BMBTableLayer__]
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0xb8], 2
call dword [sym.imp.mfc90.dll_Ordinal_817]
lea ecx, [esp + 0x2c]
mov byte [esp + 0xb4], 1
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov ebx, 1
cmp dword [esp + 0x14], ebx
jle 0x40f320
jmp 0x40f230
mov edx, dword [esp + 0x1c]
mov esi, dword [edx + ebx*4]
lea ecx, [esp + 0x4c]
call fcn.0055e0a0
lea eax, [esp + 0x4c]
push eax
mov ecx, esi
mov byte [esp + 0xb8], 3
call fcn.00558bd0
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x50]
call fcn.0055f620
push 0x28
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
mov dword [esp + 0x44], esi
mov byte [esp + 0xb4], 4
test esi, esi
je 0x40f2ed
fldz
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x24]
push ecx
lea ecx, [esp + 0x30]
fstp dword [esp]
push ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], eax
call fcn.0042ac80
push ecx
mov ecx, dword [esp + 0x28]
fstp dword [esp]
lea edx, [esp + 0x38]
push edx
call fcn.0042ac80
push ecx
fstp dword [esp]
push 1
push edi
mov edi, dword [esp + 0xd0]
mov ecx, edi
call dword [sym.imp.BMB_NX_C9.dll_public:_unsigned_char___thiscall_BMBElement::GetKind_void_]
movzx eax, al
push eax
mov ecx, edi
call dword [sym.imp.BMB_NX_C9.dll_public:_long_int___thiscall_BMBElement::GetID_void_]
push eax
push 1
mov ecx, esi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBMessage::constructor_unsigned_char__long_int__unsigned_char__char_const___int__float__float__float_]
mov dword [esi], vtable.BMBMessage.0
jmp 0x40f2ef
xor esi, esi
mov ecx, dword [0x683034]
push esi
mov byte [esp + 0xb8], 3
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBProduct::AddMessage_class_BMBMessage__]
lea ecx, [esp + 0x4c]
mov byte [esp + 0xb4], 1
call fcn.00563400
inc ebx
cmp ebx, dword [esp + 0x14]
jl 0x40f230
lea ecx, [esp + 0x24]
mov byte [esp + 0xb4], 0
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov ebx, dword [esp + 0x20]
lea ecx, [esp + 0x14]
call fcn.00516990
jmp 0x40f446
jne 0x40f43f
mov ecx, dword [esp + 0x1c]
mov esi, dword [ecx]
mov edx, dword [esi]
mov eax, dword [edx + 0x78]
push 0xff
mov ecx, esi
call eax
lea ecx, [esp + 0x74]
call fcn.0055e0a0
lea ecx, [esp + 0x74]
push ecx
mov ecx, esi
mov byte [esp + 0xb8], 5
call fcn.00558bd0
push 0xff
lea ecx, [esp + 0x78]
call fcn.00564bd0
mov edx, dword [esp + 0xc4]
mov esi, dword [esp + 0xbc]
push edx
push 4
lea eax, [esp + 0x7c]
push eax
push esi
mov ecx, ebx
call fcn.0040ef80
add ebp, 0x14
push ebp
lea ecx, [esp + 0x48]
call fcn.005ee7e0
mov eax, dword [esp + 0x48]
mov byte [esp + 0xb4], 6
test eax, eax
je 0x40f40b
lea edx, [esp + 0x74]
lea ecx, [eax - 0x14]
push edx
call fcn.00558bd0
push 0xff
lea ecx, [esp + 0x78]
call fcn.00564bd0
push 0
push 5
lea eax, [esp + 0x7c]
push eax
push esi
mov ecx, ebx
call fcn.0040ef80
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
cmp eax, dword [ecx]
jne 0x40f400
xor eax, eax
jmp 0x40f403
mov eax, dword [eax + 0xc]
mov dword [esp + 0x48], eax
test eax, eax
jne 0x40f3c4
lea ecx, [esp + 0x14]
call fcn.00516990
lea ecx, [esp + 0x44]
mov byte [esp + 0xb4], 5
call fcn.0051a4a0
lea ecx, [esp + 0x74]
mov byte [esp + 0xb4], 0
call fcn.00563400
lea ecx, [esp + 0x14]
jmp 0x40f87c
mov edi, dword [esp + 0xbc]
lea ecx, [esp + 0x14]
mov dword [esp + 0xb4], 0xffffffff
call fcn.004925b0
jmp 0x40f463
mov edi, dword [esp + 0xbc]
lea ecx, [esp + 0x68]
call fcn.00516940
lea edx, [esp + 0x68]
push edx
mov ecx, ebp
mov dword [esp + 0xb8], 7
call fcn.00543480
test eax, eax
jle 0x40f762
fldz
fcomp dword [ebx + 0x2cc]
fnstsw ax
test ah, 5
jp 0x40f762
fld dword [ebx + 0x2cc]
fmul qword [0x631d60]
call fcn.005f9c80
lea ecx, [esp + 0x14]
mov dword [esp + 0x30], eax
call fcn.00516940
mov eax, dword [ebp]
mov edx, dword [eax + 0x30]
mov ecx, ebp
mov byte [esp + 0xb4], 8
call edx
mov esi, eax
lea eax, [esp + 0x14]
push eax
mov ecx, esi
mov dword [esp + 0x48], esi
call fcn.00543480
mov eax, dword [esp + 0x14]
xor edi, edi
test eax, eax
jle 0x40f516
lea ebx, [ebx]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + edi*4]
push edx
mov ecx, esi
call fcn.00542740
mov eax, dword [esi]
mov edx, dword [eax + 0x78]
push 0xff
mov ecx, esi
call edx
mov eax, dword [esp + 0x14]
inc edi
cmp edi, eax
jl 0x40f4f0
xor ebp, ebp
test eax, eax
jle 0x40f655
mov bl, 0xa
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + ebp*4]
mov edx, dword [ecx]
mov eax, dword [edx + 0x30]
call eax
lea ecx, [esp + 0x38]
mov edi, eax
call fcn.00516940
mov ecx, dword [esp + 0x30]
push 0x5a
push ecx
lea edx, [esp + 0x40]
push edi
push edx
mov byte [esp + 0xc4], 9
call fcn.00582130
mov eax, dword [esp + 0x48]
add esp, 0x10
cmp eax, 0x1f4
jle 0x40f607
xor edi, edi
test eax, eax
jle 0x40f61d
cmp edi, eax
jge 0x40f57e
mov eax, dword [esp + 0x40]
lea eax, [eax + edi*4]
jmp 0x40f588
push edi
lea ecx, [esp + 0x3c]
call fcn.005f1b40
mov ecx, dword [eax]
push ecx
lea ecx, [esp + 0x78]
call fcn.00551150
push esi
push 0x24
mov byte [esp + 0xbc], bl
call fcn.00542690
add esp, 8
mov dword [esp + 0x2c], eax
mov byte [esp + 0xb4], 0xb
test eax, eax
je 0x40f5c4
lea edx, [esp + 0x74]
push edx
mov ecx, eax
call fcn.00541a70
jmp 0x40f5c6
xor eax, eax
mov byte [esp + 0xb4], bl
test eax, eax
je 0x40f5e7
push eax
mov ecx, esi
call fcn.00542770
mov eax, dword [esi]
mov edx, dword [eax + 0x78]
push 0xff
mov ecx, esi
call edx
lea ecx, [esp + 0x74]
mov byte [esp + 0xb4], 9
call fcn.00556b60
mov eax, dword [esp + 0x38]
inc edi
cmp edi, eax
jl 0x40f575
jmp 0x40f61d
push edi
mov ecx, esi
call fcn.00542770
mov eax, dword [esi]
mov edx, dword [eax + 0x78]
push 0xff
mov ecx, esi
call edx
push 0
lea ecx, [esp + 0x3c]
call fcn.005f1b40
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], 0
call fcn.00516990
lea ecx, [esp + 0x38]
mov byte [esp + 0xb4], 8
call fcn.004925b0
inc ebp
cmp ebp, dword [esp + 0x14]
jl 0x40f522
lea ecx, [esp + 0x4c]
call fcn.0055e0a0
lea eax, [esp + 0x4c]
mov bl, 0xc
push eax
mov ecx, esi
mov byte [esp + 0xb8], bl
call fcn.00558bd0
push 0xff
lea ecx, [esp + 0x50]
call fcn.00564bd0
mov ecx, dword [esp + 0xc4]
mov edi, dword [esp + 0xbc]
mov ebp, dword [esp + 0x20]
push ecx
push 4
lea edx, [esp + 0x54]
push edx
push edi
mov ecx, ebp
call fcn.0040ef80
test esi, esi
je 0x40f6ac
add esi, 0x14
jmp 0x40f6ae
xor esi, esi
push esi
lea ecx, [esp + 0x28]
call fcn.005ee7e0
mov eax, dword [esp + 0x28]
mov byte [esp + 0xb4], 0xd
test eax, eax
je 0x40f70f
lea ecx, [eax - 0x14]
lea eax, [esp + 0x4c]
push eax
call fcn.00558bd0
push 0xff
lea ecx, [esp + 0x50]
call fcn.00564bd0
push 0
push 5
lea ecx, [esp + 0x54]
push ecx
push edi
mov ecx, ebp
call fcn.0040ef80
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
cmp eax, dword [edx]
jne 0x40f704
xor eax, eax
jmp 0x40f707
mov eax, dword [eax + 0xc]
mov dword [esp + 0x28], eax
test eax, eax
jne 0x40f6c8
push 0
lea ecx, [esp + 0x18]
call fcn.005f1b40
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0
call fcn.00516990
lea ecx, [esp + 0x24]
mov byte [esp + 0xb4], bl
call fcn.0051a4a0
lea ecx, [esp + 0x4c]
mov byte [esp + 0xb4], 8
call fcn.00563400
lea ecx, [esp + 0x14]
mov byte [esp + 0xb4], 7
call fcn.004925b0
jmp 0x40f85c
lea ecx, [esp + 0x4c]
call fcn.0055e0a0
lea eax, [esp + 0x4c]
push eax
mov ecx, ebp
mov byte [esp + 0xb8], 0xe
call fcn.00558bd0
push 0xff
lea ecx, [esp + 0x50]
call fcn.00564bd0
mov ecx, dword [esp + 0xc4]
push ecx
push 4
lea edx, [esp + 0x54]
push edx
push edi
mov ecx, ebx
call fcn.0040ef80
add ebp, 0x14
push ebp
lea ecx, [esp + 0x34]
call fcn.005ee7e0
mov eax, dword [esp + 0x34]
mov bl, 0xf
mov byte [esp + 0xb4], bl
test eax, eax
je 0x40f83a
lea ecx, [esp + 0x90]
lea esi, [eax - 0x14]
call fcn.0055e0a0
lea eax, [esp + 0x90]
push eax
mov ecx, esi
mov byte [esp + 0xb8], 0x10
call fcn.00558bd0
push 0xff
lea ecx, [esp + 0x50]
call fcn.00564bd0
push 0
push 5
lea ecx, [esp + 0x98]
push ecx
mov ecx, dword [esp + 0x2c]
push edi
call fcn.0040ef80
lea ecx, [esp + 0x90]
mov byte [esp + 0xb4], bl
call fcn.00563400
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
cmp eax, dword [edx]
jne 0x40f82f
xor eax, eax
jmp 0x40f832
mov eax, dword [eax + 0xc]
mov dword [esp + 0x34], eax
test eax, eax
jne 0x40f7c2
lea ecx, [esp + 0x30]
mov byte [esp + 0xb4], 0xe
call fcn.0051a4a0
lea ecx, [esp + 0x4c]
mov byte [esp + 0xb4], 7
call fcn.00563400
push 0
lea ecx, [esp + 0x6c]
call fcn.005f1b40
lea ecx, [esp + 0x68]
mov dword [esp + 0x68], 0
call fcn.00516990
lea ecx, [esp + 0x68]
mov dword [esp + 0xb4], 0xffffffff
call fcn.004925b0
mov ecx, dword [esp + 0xac]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa4
ret 0xc