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

Disassembly:
push 0xffffffffffffffff
push 0x612f39
mov eax, dword fs:[0]
push eax
sub esp, 0x154
push ebx
push ebp
push esi
push edi
mov eax, dword [0x685e38]
xor eax, esp
push eax
lea eax, [esp + 0x168]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x178]
xor edi, edi
mov dword [ebx + 0x64], eax
mov eax, dword [eax + 0x30]
lea esi, [ebx + 0x84]
push edi
mov ecx, esi
mov dword [esp + 0x174], edi
mov dword [ebx + 0x60], eax
call fcn.005f3c00
mov dword [esi], edi
mov ecx, dword [0x68615c]
cmp ecx, edi
je 0x408252
call dword [sym.imp.BMB_NX_C9.dll_public:_class_BMBMapMaterial____thiscall_BMBProduct::GetMapMaterial_void_]
mov dword [ebx + 0x80], eax
cmp eax, edi
jne 0x408252
push 0x24
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
mov dword [esp + 0x8c], esi
mov byte [esp + 0x170], 1
cmp esi, edi
je 0x408235
mov ecx, esi
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBMapMaterial::constructor_void_]
mov dword [esi], vtable.BMBMapMaterial.0
jmp 0x408237
xor esi, esi
mov dword [ebx + 0x80], esi
mov ecx, dword [0x68615c]
push esi
mov byte [esp + 0x174], 0
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBProduct::PutMapMaterial_class_BMBMapMaterial__]
mov ecx, dword [0x686168]
cmp ecx, edi
je 0x409af6
call dword [sym.imp.BMA_C9.dll_public:_class_BMAInterface____thiscall_BMAProject::GetInterface_void_]
mov ecx, eax
call dword [sym.imp.BMA_C9.dll_public:_class_BMAIfBD____thiscall_BMAInterface::GetBD_void_]
mov ebp, eax
push edi
mov ecx, ebp
mov dword [esp + 0x98], ebp
call dword [sym.imp.BMA_C9.dll_public:_class_BMAIfBDLayer____thiscall_BMAIfBD::GetLayer_int_]
lea ecx, [esp + 0x98]
call fcn.005f3af0
push edi
lea ecx, [esp + 0x9c]
mov byte [esp + 0x174], 2
call fcn.005ee750
lea eax, [esp + 0x188]
push 0x633c9c
push eax
mov dword [esp + 0xa0], edi
call fcn.005edad0
add esp, 8
test eax, eax
je 0x408348
mov ecx, ebp
xor edi, edi
call dword [sym.imp.BMA_C9.dll_public:_int___thiscall_BMAIfBD::CountLayer_void_]
test eax, eax
jle 0x408373
push edi
mov ecx, ebp
call dword [sym.imp.BMA_C9.dll_public:_class_BMAIfBDLayer____thiscall_BMAIfBD::GetLayer_int_]
cmp byte [eax + 0x1c], 1
jne 0x408339
mov eax, dword [eax + 0xc]
push eax
lea ecx, [esp + 0xa8]
push ecx
mov ecx, ebx
call fcn.0041d5a0
mov esi, eax
mov edx, dword [esp + 0x98]
push edx
lea ecx, [esp + 0x9c]
mov byte [esp + 0x174], 3
call fcn.005ee750
mov ecx, dword [esi + 4]
mov esi, dword [esi]
push ecx
push esi
mov ecx, eax
call fcn.005ed450
lea ecx, [esp + 0xa4]
mov byte [esp + 0x170], 2
call fcn.005ed430
mov ecx, ebp
inc edi
call dword [sym.imp.BMA_C9.dll_public:_int___thiscall_BMAIfBD::CountLayer_void_]
cmp edi, eax
jl 0x4082d7
jmp 0x408373
mov eax, dword [esp + 0x98]
push eax
lea ecx, [esp + 0x9c]
call fcn.005ee750
mov ecx, dword [esp + 0x18c]
mov edx, dword [esp + 0x188]
push ecx
push edx
mov ecx, eax
call fcn.005ed450
push 0x633c9c
lea ecx, [esp + 0xc4]
call fcn.005edd80
push 0x633c9c
lea ecx, [esp + 0xb8]
mov byte [esp + 0x174], 4
call fcn.005edd80
cmp dword [ebx + 0x34], 1
mov byte [esp + 0x170], 5
jne 0x4084d5
mov esi, dword [sym.imp.BMA_C9.dll_public:_class_ATL::CStringT_char__class_StrTraitMFC_DLL_char__class_ATL::ChTraitsCRT_char______thiscall_BMAIfBD::GetBaseLayerNameOfSimpleShape_int_]
push 0
lea eax, [esp + 0x18]
push eax
mov ecx, ebp
call esi
mov eax, dword [eax]
push eax
lea ecx, [esp + 0xa8]
push ecx
mov ecx, ebx
mov byte [esp + 0x178], 6
call fcn.0041d5a0
mov ecx, dword [eax + 4]
mov eax, dword [eax]
push ecx
push eax
lea ecx, [esp + 0xc8]
mov byte [esp + 0x178], 7
call fcn.005ed450
lea ecx, [esp + 0xa4]
mov byte [esp + 0x170], 6
call fcn.005ed430
lea ecx, [esp + 0x14]
mov byte [esp + 0x170], 5
call dword [sym.imp.mfc90.dll_Ordinal_601]
push 1
lea edx, [esp + 0x18]
push edx
mov ecx, ebp
call esi
mov eax, dword [eax]
push eax
lea eax, [esp + 0xa8]
push eax
mov ecx, ebx
mov byte [esp + 0x178], 8
call fcn.0041d5a0
mov ecx, dword [eax + 4]
mov eax, dword [eax]
push ecx
push eax
lea ecx, [esp + 0xbc]
mov byte [esp + 0x178], 9
call fcn.005ed450
lea ecx, [esp + 0xa4]
mov byte [esp + 0x170], 8
call fcn.005ed430
lea ecx, [esp + 0x14]
mov byte [esp + 0x170], 5
call dword [sym.imp.mfc90.dll_Ordinal_601]
lea ecx, [esp + 0xc0]
push 0x633c9c
push ecx
call fcn.005edad0
add esp, 8
test eax, eax
je 0x4084ab
push str.CompArea_A
lea ecx, [esp + 0xc4]
call fcn.005edbf0
lea edx, [esp + 0xb4]
push 0x633c9c
push edx
call fcn.005edad0
add esp, 8
test eax, eax
je 0x4084d5
push str.CompArea_B
lea ecx, [esp + 0xb8]
call fcn.005edbf0
mov eax, dword [esp + 0xc4]
mov edx, dword [esp + 0xc0]
push eax
lea ecx, [ebx + 0x38]
push edx
call fcn.005ed450
mov eax, dword [esp + 0xb8]
mov edx, dword [esp + 0xb4]
push eax
lea ecx, [ebx + 0x44]
push edx
call fcn.005ed450
mov ecx, ebp
call dword [sym.imp.BMA_C9.dll_public:_float___thiscall_BMAIfBD::GetMinLength_void_]
fstp dword [ebx + 0x50]
mov ecx, ebp
call dword [sym.imp.BMA_C9.dll_public:_float___thiscall_BMAIfBD::GetMinDiameter_void_]
fstp dword [ebx + 0x54]
mov ecx, ebp
call dword [sym.imp.BMA_C9.dll_public:_int___thiscall_BMAIfBD::GetDivideNum_void_]
cmp eax, 0x168
mov dword [ebx + 0x58], eax
jle 0x408534
mov dword [ebx + 0x58], 0x168
mov eax, dword [ebx + 0x64]
mov eax, dword [eax + 0x3c]
xor ebp, ebp
xor edi, edi
mov dword [esp + 0x28], ebp
test eax, eax
jle 0x4085aa
mov eax, dword [ebx + 0x64]
mov edx, dword [eax + 0x40]
movzx ecx, di
mov esi, dword [edx + ecx*4]
lea eax, [edx + ecx*4]
test esi, esi
je 0x40857f
mov eax, dword [esi + 8]
test eax, eax
jne 0x40857b
mov ebp, dword [esi + 4]
and ebp, 0x7f
call fcn.005018f0
mov eax, dword [eax + ebp*4 - 4]
push esi
mov ecx, eax
call fcn.00500ce0
mov ebp, dword [esp + 0x28]
mov esi, eax
jmp 0x408581
xor esi, esi
mov eax, dword [esi]
mov edx, dword [eax + 0x3c]
mov ecx, esi
call edx
movzx eax, ax
cmp eax, ebp
jle 0x4085a1
mov edx, dword [esi]
mov eax, dword [edx + 0x3c]
mov ecx, esi
call eax
movzx ebp, ax
mov dword [esp + 0x28], ebp
mov ecx, dword [ebx + 0x64]
inc edi
cmp edi, dword [ecx + 0x3c]
jl 0x408546
xor esi, esi
test ebp, ebp
jl 0x4085d6
lea edi, [ebx + 0x74]
cmp esi, dword [edi]
jge 0x4085bf
mov edx, dword [edi + 8]
lea eax, [edx + esi*4]
jmp 0x4085c7
push esi
mov ecx, edi
call fcn.005f3cc0
xor ecx, ecx
cmp dword [ebx + 4], ecx
sete cl
inc esi
cmp esi, ebp
mov dword [eax], ecx
jle 0x4085b3
cmp dword [ebx + 4], 0
je 0x408776
lea ecx, [esp + 0xcc]
call fcn.005ef4f0
mov ecx, dword [ebx + 0x64]
push 3
mov byte [esp + 0x174], 0xa
call fcn.004e2900
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x58]
call eax
push eax
lea ecx, [esp + 0x90]
call fcn.004bb830
lea ecx, [esp + 0x8c]
mov byte [esp + 0x170], 0xb
call fcn.004bb850
lea ecx, [esp + 0x8c]
call fcn.004f69c0
test eax, eax
je 0x40869e
jmp 0x408640
lea ecx, [esp + 0x8c]
call fcn.004f69c0
mov esi, eax
mov edx, dword [esi]
mov eax, dword [edx + 0x38]
mov ecx, esi
call eax
cmp eax, 0xe
je 0x40866a
mov edx, dword [esi]
mov eax, dword [edx + 0x38]
mov ecx, esi
call eax
cmp eax, 0xf
jne 0x408682
mov ecx, esi
call fcn.00470f00
test eax, eax
je 0x408682
push eax
lea ecx, [esp + 0xd0]
call fcn.005ef2f0
lea ecx, [esp + 0x8c]
call fcn.004bb880
lea ecx, [esp + 0x8c]
call fcn.004f69c0
test eax, eax
jne 0x408640
lea ecx, [esp + 0xcc]
push ecx
lea ecx, [esp + 0xa8]
call fcn.005ef700
lea ecx, [esp + 0xa4]
mov byte [esp + 0x170], 0xc
call fcn.005ef6a0
mov eax, dword [esp + 0xac]
test eax, eax
je 0x40873a
lea edi, [eax + 0x4c]
mov dword [esp + 0x14], eax
movzx eax, word [edi]
xor edx, edx
xor esi, esi
cmp dx, ax
jae 0x408723
lea ebp, [ebx + 0x74]
jmp 0x4086f0
mov ecx, dword [esp + 0x14]
push esi
call fcn.004b9fc0
movzx eax, word [eax]
cmp eax, dword [ebp]
jge 0x40870a
mov ecx, dword [ebp + 8]
lea eax, [ecx + eax*4]
jmp 0x408712
push eax
mov ecx, ebp
call fcn.005f3cc0
mov dword [eax], 1
movzx eax, word [edi]
movzx edx, ax
inc esi
cmp esi, edx
jl 0x4086f0
lea ecx, [esp + 0xa4]
call fcn.005ef6c0
mov eax, dword [esp + 0xac]
test eax, eax
jne 0x4086d1
lea ecx, [esp + 0xa4]
mov byte [esp + 0x170], 0xb
call fcn.004f2200
lea ecx, [esp + 0x8c]
mov byte [esp + 0x170], 0xa
call fcn.004f2200
lea ecx, [esp + 0xcc]
mov byte [esp + 0x170], 5
call fcn.005ef580
lea ecx, [esp + 0x2c]
call fcn.00406040
fldz
xor edi, edi
fstp dword [ebx + 0x5c]
cmp dword [ebx + 0x60], edi
mov byte [esp + 0x170], 0xd
mov dword [esp + 0x20], 1
jle 0x408ad6
nop
mov eax, dword [ebx + 0x64]
mov ecx, dword [eax + 0x30]
movzx esi, di
cmp ecx, esi
jle 0x4087de
mov eax, dword [eax + 0x34]
mov ebp, dword [eax + esi*4]
lea eax, [eax + esi*4]
test ebp, ebp
je 0x4087de
mov eax, dword [ebp + 8]
test eax, eax
jne 0x4087e0
mov ebx, dword [ebp + 4]
and ebx, 0x7f
call fcn.005018f0
mov ebx, dword [eax + ebx*4 - 4]
push ebp
mov ecx, ebx
call fcn.00500ce0
mov ebx, dword [esp + 0x1c]
jmp 0x4087e0
xor eax, eax
cmp dword [ebx + 0x30], 0
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], 0
mov dword [esp + 0x6c], 1
je 0x408849
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x48]
call eax
test eax, eax
je 0x408849
mov ecx, dword [esp + 0x2c]
mov ebp, ecx
test ecx, ecx
je 0x408849
call fcn.004b0b60
test eax, eax
je 0x408849
mov ecx, ebp
call fcn.004b0b60
mov dword [esp + 0x30], eax
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x3c]
call eax
mov ecx, dword [esp + 0x180]
movzx eax, ax
shl eax, 5
add eax, dword [ecx + 8]
movzx eax, word [eax + 0x10]
movzx edx, ax
mov dword [esp + 0x6c], edx
push str.Conductive_
lea ecx, [esp + 0x38]
call fcn.005edbf0
lea eax, [edi + 1]
push eax
lea ecx, [esp + 0x38]
mov dword [esp + 0x2c], eax
call fcn.005edd10
mov ax, word [esp + 0x20]
mov word [esp + 0x50], ax
test edi, edi
jne 0x408899
mov ecx, dword [ebx + 0x60]
mov dx, cx
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], ecx
mov byte [esp + 0x58], 2
mov word [esp + 0x54], dx
mov byte [esp + 0x7d], 0
jmp 0x4088f2
mov eax, dword [ebx + 0x60]
lea ecx, [eax - 1]
cmp edi, ecx
jne 0x4088c8
mov edx, 1
mov dword [esp + 0x40], 2
mov dword [esp + 0x44], 1
mov byte [esp + 0x58], 3
mov word [esp + 0x54], dx
mov byte [esp + 0x7d], dl
jmp 0x4088f2
sub eax, edi
dec eax
cmp edi, eax
setg al
add al, 4
xor ecx, ecx
mov dword [esp + 0x40], 3
mov dword [esp + 0x44], 0
mov byte [esp + 0x58], al
mov word [esp + 0x54], cx
mov byte [esp + 0x7d], 2
mov edx, dword [esp + 0x7d]
mov ecx, dword [esp + 0x94]
push edx
xor ebp, ebp
push 5
mov dword [esp + 0x50], ebp
mov byte [esp + 0x5e], 1
mov byte [esp + 0x5f], 5
call dword [sym.imp.BMA_C9.dll_public:_bool___thiscall_BMAIfBD::GetImportElement_unsigned_char__unsigned_char_]
sub esp, 0xc
lea eax, [esp + 0xa4]
mov ecx, esp
mov dword [esp + 0x98], esp
push eax
call fcn.005ee8e0
sub esp, 0xc
lea edx, [esp + 0x4c]
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
mov byte [esp + 0x18c], 0xe
call fcn.005edb30
mov ecx, ebx
mov byte [esp + 0x188], 0xd
call fcn.00406e50
xor ecx, ecx
cmp eax, ebp
setne cl
xor edx, edx
cmp dword [ebx + 0x28], ebp
mov eax, esi
setne dl
inc dword [esp + 0x20]
shl eax, 5
mov dword [esp + 0x80], ecx
mov ecx, dword [esp + 0x180]
add eax, dword [ecx + 0x10]
mov ecx, dword [esp + 0x184]
mov dword [esp + 0x84], edx
mov dword [esp + 0x4c], ebp
movzx eax, word [eax + 0x10]
movzx edx, ax
mov dword [esp + 0x68], edx
mov edx, dword [ecx + 0x14]
mov ecx, dword [esp + 0x17c]
lea eax, [esi + esi*2]
lea eax, [edx + eax*4]
movzx eax, byte [eax + 8]
and eax, 1
push edi
mov dword [esp + 0x74], eax
call fcn.0047d460
mov ecx, eax
call fcn.0047ca80
cmp dword [esp + 0x198], 1
mov ebp, eax
jne 0x408a0d
test ebp, ebp
je 0x4089fb
mov ecx, dword [ebp + 0x14]
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x18], ecx
call fcn.00405e10
fstp dword [esp + 0x7c]
fld dword [ebx + 0x5c]
add esp, 4
fadd dword [esp + 0x78]
fstp dword [ebx + 0x5c]
jmp 0x408a13
fldz
fstp dword [esp + 0x78]
fld dword [ebx + 0x5c]
fadd dword [esp + 0x78]
fstp dword [ebx + 0x5c]
jmp 0x408a13
fldz
fstp dword [esp + 0x78]
test ebp, ebp
je 0x408a24
mov ebp, dword [ebp + 0x18]
push ebp
lea ecx, [esp + 0x60]
call fcn.005edbf0
mov eax, dword [ebx + 0x64]
cmp dword [eax + 0x30], esi
jle 0x408a58
mov eax, dword [eax + 0x34]
lea esi, [eax + esi*4]
mov esi, dword [esi]
test esi, esi
je 0x408a58
mov eax, dword [esi + 8]
test eax, eax
jne 0x408a5a
mov ebp, dword [esi + 4]
and ebp, 0x7f
call fcn.005018f0
mov ebp, dword [eax + ebp*4 - 4]
push esi
mov ecx, ebp
call fcn.00500ce0
jmp 0x408a5a
xor eax, eax
mov eax, dword [eax + 0x34]
cmp eax, 1
je 0x408a6c
mov byte [esp + 0x59], 0
cmp eax, 2
jne 0x408a70
mov byte [esp + 0x59], al
mov edx, dword [ebx + 0x68]
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [ebx + 0x68]
push edx
call fcn.00407dd0
mov ecx, eax
call fcn.00406170
mov esi, dword [esp + 0x28]
cmp esi, dword [ebx + 0x60]
jge 0x408acb
mov eax, dword [esp + 0x19c]
mov ecx, dword [esp + 0x17c]
push eax
push ecx
push edi
mov ecx, ebx
call fcn.00407d00
fstp dword [esp + 0x14]
mov edx, dword [ebx + 0x84]
lea ecx, [ebx + 0x84]
push edx
call fcn.005f3c00
fld dword [esp + 0x14]
fst dword [eax]
fadd dword [ebx + 0x5c]
fstp dword [ebx + 0x5c]
mov edi, esi
cmp edi, dword [ebx + 0x60]
jl 0x4087a0
mov ecx, dword [0x68615c]
xor ebp, ebp
cmp ecx, ebp
je 0x408be9
lea eax, [esp + 0xdc]
push eax
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBProduct::GetModelingRule_struct_BMB_ModelingRule___]
mov edi, dword [ebx + 0x68]
lea ecx, [esp + 0x10c]
call fcn.00406040
fldz
lea esi, [ebp + 1]
fstp dword [esp + 0x18]
cmp edi, esi
mov byte [esp + 0x170], 0xf
jle 0x408b6d
mov ecx, esi
imul ecx, ecx, 0x5c
add ecx, dword [ebx + 0x70]
push ecx
lea ecx, [esp + 0x110]
call fcn.00406170
cmp esi, 1
jne 0x408b42
fld dword [esp + 0x158]
fstp dword [esp + 0xe8]
jmp 0x408b68
lea edx, [edi - 1]
cmp esi, edx
jne 0x408b59
fld dword [esp + 0x158]
fstp dword [esp + 0xec]
jmp 0x408b68
fld dword [esp + 0x158]
fadd dword [esp + 0x18]
fstp dword [esp + 0x18]
inc esi
cmp esi, edi
jl 0x408b18
fld dword [esp + 0x18]
dec edi
mov dword [esp + 0x14], edi
fidiv dword [esp + 0x14]
mov ecx, dword [ebx + 0x84]
cmp ecx, ebp
mov dword [esp + 0x14], ecx
fstp dword [esp + 0xf0]
fldz
fstp dword [esp + 0x18]
jle 0x408bb2
mov eax, dword [ebx + 0x8c]
jmp 0x408ba0
fld dword [eax]
add eax, 4
sub ecx, 1
fadd dword [esp + 0x18]
fstp dword [esp + 0x18]
jne 0x408ba0
fld dword [esp + 0x18]
mov ecx, dword [0x68615c]
fidiv dword [esp + 0x14]
lea eax, [esp + 0xdc]
push eax
fstp dword [esp + 0xf8]
call dword [sym.imp.BMB_NX_C9.dll_public:_void___thiscall_BMBProduct::PutModelingRule_struct_BMB_ModelingRule___]
lea ecx, [esp + 0x10c]
mov byte [esp + 0x170], 0xd
call fcn.00406110
mov ecx, dword [ebx + 0x64]
push 3
call fcn.004e2900
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x6c], 1
cmp dword [ebx + 0x30], ebp
je 0x408c57
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x48]
call eax
test eax, eax
je 0x408c57
mov ecx, dword [esp + 0x2c]
mov esi, ecx
cmp ecx, ebp
je 0x408c57
call fcn.004b0b60
test eax, eax
je 0x408c57
mov ecx, esi
call fcn.004b0b60
mov dword [esp + 0x30], eax
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x3c]
call eax
mov ecx, dword [esp + 0x180]
movzx eax, ax
shl eax, 5
add eax, dword [ecx + 8]
movzx eax, word [eax + 0x10]
movzx edx, ax
mov dword [esp + 0x6c], edx
push str.Hole
lea ecx, [esp + 0x38]
call fcn.005edbf0
fldz
mov ecx, dword [esp + 0x180]
mov esi, dword [esp + 0x20]
xor eax, eax
mov word [esp + 0x54], ax
mov eax, dword [ecx + 8]
add eax, 0x60
mov dword [esp + 0x40], ebp
mov byte [esp + 0x58], 6
mov byte [esp + 0x7d], 0
mov dword [esp + 0x44], ebp
mov word [esp + 0x50], si
mov dword [esp + 0x48], ebp
mov byte [esp + 0x57], 2
mov byte [esp + 0x56], 3
mov dword [esp + 0x4c], ebp
movzx eax, word [eax + 0x10]
movzx edx, ax
mov eax, dword [esp + 0x184]
mov eax, dword [eax + 0xc]
add eax, 0x24
mov dword [esp + 0x68], edx
movzx ecx, byte [eax + 8]
fstp dword [esp + 0x78]
and ecx, 1
mov dword [esp + 0x70], ecx
push 0x633c9c
lea ecx, [esp + 0x60]
mov byte [esp + 0x5d], 0
call fcn.005edbf0
sub esp, 0xc
lea edx, [esp + 0xa4]
mov ecx, esp
mov dword [esp + 0x98], esp
push edx
mov byte [esp + 0x8d], 0
call fcn.005ee8e0
sub esp, 0xc
lea eax, [esp + 0x4c]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
mov byte [esp + 0x18c], 0x10
call fcn.005edb30
mov ecx, ebx
mov byte [esp + 0x188], 0xd
call fcn.00406e50
xor ecx, ecx
cmp eax, 1
sete cl
xor edx, edx
cmp dword [ebx + 0x24], ebp
lea eax, [esp + 0x2c]
setne dl
push eax
mov dword [esp + 0x84], ecx
lea ecx, [ebx + 0x68]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x88], edx
mov edx, dword [ecx]
push edx
call fcn.00407dd0
mov ecx, eax
call fcn.00406170
inc esi
cmp dword [ebx + 0x60], ebp
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], ebp
jle 0x409340
jmp 0x408d80
mov eax, dword [ebx + 0x64]
movzx ecx, word [esp + 0x24]
mov edx, dword [eax + 0x30]
cmp edx, ecx
jle 0x408dbc
mov eax, dword [eax + 0x34]
mov esi, dword [eax + ecx*4]
lea eax, [eax + ecx*4]
cmp esi, ebp
je 0x408dbc
mov eax, dword [esi + 8]
cmp eax, ebp
jne 0x408dbe
mov edi, dword [esi + 4]
and edi, 0x7f
call fcn.005018f0
mov edi, dword [eax + edi*4 - 4]
push esi
mov ecx, edi
call fcn.00500ce0
jmp 0x408dbe
xor eax, eax
cmp dword [eax + 0x24], ebp
mov dword [esp + 0x88], eax
mov dword [esp + 0x28], ebp
jle 0x40932e
fldz
push 0x633c9c
lea ecx, [esp + 0x60]
fstp dword [esp + 0x7c]
mov byte [esp + 0x5d], 0
call fcn.005edbf0
mov esi, dword [esp + 0x88]
mov ecx, esi
call fcn.00502510
mov eax, dword [esi + 0x24]
movzx esi, word [esp + 0x28]
cmp esi, eax
jge 0x408e2e
mov edi, dword [esp + 0x88]
mov eax, dword [edi + 0x24]
add edi, 0x20
cmp esi, eax
jl 0x408e23
mov ecx, esi
sub ecx, eax
inc ecx
push ecx
mov ecx, edi
call fcn.004080a0
mov eax, dword [edi + 8]
lea edx, [esi + esi*2]
lea edi, [eax + edx*4]
jmp 0x408e30
xor edi, edi
mov ecx, edi
mov dword [esp + 0x14], ebp
call fcn.004f69c0
dec eax
cmp eax, 0x10
ja case.0x408e4c.9
movzx ecx, byte [eax + 0x409b44]
jmp dword [ecx*4 + 0x409b2c]
cmp dword [ebx + 8], ebp
je 0x409315
mov dword [esp + 0x48], 2
mov dword [esp + 0x4c], 1
mov byte [esp + 0x57], 9
mov byte [esp + 0x56], 4
jmp 0x40904a
mov ecx, edi
mov dword [esp + 0x48], 1
mov dword [esp + 0x4c], ebp
call fcn.004f69c0
cmp eax, 2
setne dl
inc dl
mov ecx, edi
mov byte [esp + 0x7c], dl
mov byte [esp + 0x57], 6
mov byte [esp + 0x56], 4
call fcn.00435660
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x38]
call eax
cmp eax, ebp
je 0x408f11
mov ecx, str.Resist_A
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408ee0
test dl, dl
je 0x408edc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408ee0
add eax, 2
add ecx, 2
test dl, dl
jne 0x408ec0
xor eax, eax
jmp 0x408ee5
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
jne 0x408f11
mov ecx, dword [esp + 0x17c]
call fcn.0047d460
mov esi, eax
mov ecx, esi
call fcn.004ae290
test ax, ax
jbe 0x408fc8
push ebp
mov ecx, esi
call fcn.0047cae0
jmp 0x408f7b
mov ecx, edi
call fcn.00435660
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x38]
call eax
cmp eax, ebp
je 0x408fc8
mov ecx, str.Resist_B
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408f50
test dl, dl
je 0x408f4c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408f50
add eax, 2
add ecx, 2
test dl, dl
jne 0x408f30
xor eax, eax
jmp 0x408f55
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
jne 0x408fc8
mov ecx, dword [esp + 0x17c]
call fcn.0047d460
mov esi, eax
mov ecx, esi
call fcn.0047ca70
test ax, ax
jbe 0x408fc8
push ebp
mov ecx, esi
call fcn.0047cb40
cmp dword [esp + 0x198], 1
mov esi, eax
jne 0x408fb7
cmp esi, ebp
je 0x408fc8
mov eax, dword [esi + 0x10]
cmp eax, ebp
jle 0x408fb7
lea ecx, [esp + 0x8c]
push ecx
mov dword [esp + 0x90], eax
call fcn.00405e10
fstp dword [esp + 0x7c]
fld dword [ebx + 0x5c]
add esp, 4
fadd dword [esp + 0x78]
fstp dword [ebx + 0x5c]
cmp esi, ebp
je 0x408fc8
mov esi, dword [esi + 0x14]
push esi
lea ecx, [esp + 0x60]
call fcn.005edbf0
cmp dword [ebx + 0xc], ebp
je 0x409315
jmp 0x40904a
cmp dword [ebx + 0x10], ebp
je 0x409315
mov dword [esp + 0x48], 3
mov dword [esp + 0x4c], 1
mov byte [esp + 0x57], 7
mov byte [esp + 0x56], 4
jmp 0x40904a
cmp dword [ebx + 0x14], ebp
je 0x409315
mov dword [esp + 0x48], 3
mov dword [esp + 0x4c], 1
mov byte [esp + 0x57], 8
mov byte [esp + 0x56], 4
jmp 0x40904a
cmp dword [ebx + 0x14], ebp
jmp 0x408fd6
cmp dword [ebx + 0x18], ebp
je 0x409315
mov eax, 1
mov dword [esp + 0x48], 4
mov dword [esp + 0x4c], eax
mov byte [esp + 0x57], 0xb
mov byte [esp + 0x56], 2
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x24]
mov dx, word [esp + 0x20]
lea eax, [esi + 1]
mov ecx, edi
mov word [esp + 0x50], dx
mov word [esp + 0x52], ax
call fcn.00435660
mov ecx, eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x6c], 1
cmp dword [ebx + 0x30], ebp
je 0x4090d7
mov edx, dword [ecx]
mov eax, dword [edx + 0x48]
call eax
test eax, eax
je 0x4090d3
mov ecx, dword [esp + 0x2c]
mov esi, ecx
cmp ecx, ebp
je 0x409124
call fcn.004b0b60
test eax, eax
je 0x4090cf
mov ecx, esi
call fcn.004b0b60
mov dword [esp + 0x30], eax
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x3c]
call eax
mov ecx, dword [esp + 0x180]
movzx eax, ax
shl eax, 5
add eax, dword [ecx + 8]
movzx eax, word [eax + 0x10]
movzx edx, ax
mov dword [esp + 0x6c], edx
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
cmp dword [esp + 0x14], ebp
je 0x4090f2
mov eax, dword [esp + 0x30]
push eax
push ecx
mov ecx, ebx
call fcn.004068c0
test eax, eax
jne 0x409315
mov ecx, edi
call fcn.00435660
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x38]
call eax
push eax
lea ecx, [esp + 0x38]
call fcn.005edbf0
cmp esi, ebp
jne 0x40912a
mov dword [esp + 0x40], 1
mov byte [esp + 0x58], 2
mov byte [esp + 0x7d], 0
jmp 0x409164
mov esi, dword [esp + 0x24]
jmp 0x4090d7
mov eax, dword [ebx + 0x60]
lea ecx, [eax - 1]
cmp esi, ecx
jne 0x409148
mov dword [esp + 0x40], 2
mov byte [esp + 0x58], 3
mov byte [esp + 0x7d], 1
jmp 0x409164
sub eax, esi
dec eax
cmp esi, eax
setg dl
add dl, 4
mov dword [esp + 0x40], 3
mov byte [esp + 0x58], dl
mov byte [esp + 0x7d], 2
cmp dword [esp + 0x48], 4
jne 0x409170
mov byte [esp + 0x7d], 0
mov ecx, edi
mov dword [esp + 0x44], ebp
call fcn.00435660
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x3c]
call eax
mov ecx, dword [esp + 0x180]
movzx eax, ax
shl eax, 5
add eax, dword [ecx + 0x14]
mov ecx, edi
movzx eax, word [eax + 0x10]
movzx edx, ax
mov dword [esp + 0x68], edx
call fcn.00435660
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x3c]
call eax
mov edx, dword [esp + 0x184]
movzx eax, ax
lea ecx, [eax + eax*2]
mov eax, dword [edx + 0x18]
lea eax, [eax + ecx*4]
movzx ecx, byte [eax + 8]
mov eax, 1
and ecx, eax
lea edx, [esp + 0xc0]
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
push edx
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x78], ecx
call fcn.005edb00
add esp, 8
test eax, eax
je 0x409289
lea ecx, [esp + 0xb4]
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.005edb00
add esp, 8
test eax, eax
je 0x409289
mov eax, dword [esp + 0x7d]
mov ecx, dword [esp + 0x57]
push eax
push ecx
mov ecx, dword [esp + 0x9c]
call dword [sym.imp.BMA_C9.dll_public:_bool___thiscall_BMAIfBD::GetImportElement_unsigned_char__unsigned_char_]
sub esp, 0xc
lea edx, [esp + 0xa4]
mov ecx, esp
mov dword [esp + 0x98], esp
push edx
call fcn.005ee8e0
sub esp, 0xc
lea eax, [esp + 0x4c]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
mov byte [esp + 0x18c], 0x11
call fcn.005edb30
mov ecx, ebx
mov byte [esp + 0x188], 0xd
call fcn.00406e50
xor ecx, ecx
cmp eax, ebp
setne cl
mov dword [esp + 0x80], ecx
cmp dword [ebx + 0x28], ebp
jne 0x409289
mov dword [esp + 0x84], ebp
mov edx, dword [esp + 0x18]
mov edi, dword [edx]
lea ecx, [esp + 0x10c]
call fcn.00406040
xor esi, esi
cmp edi, ebp
mov byte [esp + 0x170], 0x12
jle 0x4092e1
xor ebp, ebp
jmp 0x4092b0
mov eax, dword [ebx + 0x70]
add eax, ebp
push eax
lea ecx, [esp + 0x110]
call fcn.00406170
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x110]
call fcn.00406240
test eax, eax
jne 0x4092ff
inc esi
add ebp, 0x5c
cmp esi, edi
jl 0x4092b0
xor ebp, ebp
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
lea edx, [esp + 0x2c]
push edx
push eax
call fcn.00407dd0
mov ecx, eax
call fcn.00406170
inc dword [esp + 0x20]
jmp 0x409301
xor ebp, ebp
lea ecx, [esp + 0x10c]
mov byte [esp + 0x170], 0xd
call fcn.00406110
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x88]
inc eax
cmp eax, dword [ecx + 0x24]
mov dword [esp + 0x28], eax
jl 0x408dd2
mov eax, dword [esp + 0x24]
inc eax
cmp eax, dword [ebx + 0x60]
mov dword [esp + 0x24], eax
jl 0x408d80
fldz
xor edx, edx
push 0x633c9c
fstp dword [esp + 0x7c]
lea ecx, [esp + 0x60]
mov word [esp + 0x56], dx
mov byte [esp + 0x5d], dl
call fcn.005edbf0
mov eax, dword [ebx + 0x64]
cmp dword [eax + 0x3c], ebp
mov dword [esp + 0x24], ebp
jle 0x409763
nop
mov ebx, dword [esp + 0x1c]
mov eax, dword [ebx + 0x64]
movzx ecx, word [esp + 0x24]
mov edx, dword [eax + 0x40]
mov esi, dword [edx + ecx*4]
lea eax, [edx + ecx*4]
xor ebp, ebp
cmp esi, ebp
je 0x4093b4
mov eax, dword [esi + 8]
cmp eax, ebp
jne 0x4093a9
mov edi, dword [esi + 4]
and edi, 0x7f
call fcn.005018f0
mov edi, dword [eax + edi*4 - 4]
push esi
mov ecx, edi
call fcn.00500ce0
mov esi, eax
mov dword [esp + 0x88], eax
jmp 0x4093bd
xor esi, esi
mov dword [esp + 0x88], esi
cmp dword [ebx + 0x60], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x28], ebp
jle 0x409483
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x64]
movzx ecx, word [esp + 0x28]
mov edx, dword [eax + 0x30]
cmp edx, ecx
jle 0x409410
mov edx, dword [eax + 0x34]
mov esi, dword [edx + ecx*4]
lea ecx, [edx + ecx*4]
test esi, esi
je 0x409410
mov eax, dword [esi + 8]
test eax, eax
jne 0x40940c
mov edi, dword [esi + 4]
and edi, 0x7f
call fcn.005018f0
mov edi, dword [eax + edi*4 - 4]
push esi
mov ecx, edi
call fcn.00500ce0
mov edi, eax
jmp 0x409412
xor edi, edi
xor ebx, ebx
cmp dword [edi + 0x24], ebx
jle 0x409466
mov ecx, edi
call fcn.00502510
mov eax, dword [edi + 0x24]
movzx esi, bx
cmp esi, eax
jge 0x40944c
mov eax, dword [edi + 0x24]
cmp esi, eax
lea ebp, [edi + 0x20]
jl 0x409441
mov ecx, esi
sub ecx, eax
inc ecx
push ecx
mov ecx, ebp
call fcn.004080a0
mov eax, dword [ebp + 8]
lea edx, [esi + esi*2]
lea ecx, [eax + edx*4]
jmp 0x40944e
xor ecx, ecx
call fcn.00435660
cmp eax, dword [esp + 0x88]
je 0x40974a
inc ebx
cmp ebx, dword [edi + 0x24]
jl 0x409419
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
inc eax
cmp eax, dword [ecx + 0x60]
mov dword [esp + 0x28], eax
jl 0x4093ce
mov esi, dword [esp + 0x88]
mov ebp, dword [esp + 0x1c]
cmp dword [ebp + 0x30], 0
mov ecx, esi
mov ebx, 1
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], 0
mov dword [esp + 0x6c], ebx
je 0x4094f5
mov edx, dword [esi]
mov eax, dword [edx + 0x48]
call eax
test eax, eax
je 0x4094f1
mov ecx, dword [esp + 0x2c]
mov edi, ecx
test ecx, ecx
je 0x4094f5
call fcn.004b0b60
test eax, eax
je 0x4094f1
mov ecx, edi
call fcn.004b0b60
mov dword [esp + 0x30], eax
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x3c]
call eax
mov ecx, dword [esp + 0x180]
movzx eax, ax
shl eax, 5
add eax, dword [ecx + 8]
movzx eax, word [eax + 0x10]
movzx edx, ax
mov dword [esp + 0x6c], edx
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
push eax
push ecx
mov ecx, ebp
call fcn.004068c0
test eax, eax
jne 0x40974a
mov edx, dword [esi]
mov eax, dword [edx + 0x60]
mov ecx, esi
call eax
cmp eax, ebx
jne 0x40952f
mov edi, dword [esp + 0x14]
mov byte [esp + 0x58], 6
mov byte [esp + 0x57], 2
mov byte [esp + 0x56], 3
jmp 0x4095e7
mov edx, dword [esi]
mov eax, dword [edx + 0x38]
mov ecx, esi
call eax
push eax
lea ecx, [esp + 0xa8]
call fcn.005edd80
lea ecx, [esp + 0xa4]
push str.BendLine
push ecx
mov byte [esp + 0x178], 0x13
call fcn.005edad0
add esp, 8
test eax, eax
je 0x409574
mov byte [esp + 0x58], 6
mov byte [esp + 0x56], 3
mov edi, ebx
jmp 0x4095ce
mov eax, dword [esp + 0xa4]
test eax, eax
je 0x409594
push 0xc
push str.FlexibleArea
push eax
call dword [sym.imp.MSVCR90.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x4095ad
lea edx, [esp + 0xa4]
push str.BendArea
push edx
call fcn.005edad0
add esp, 8
test eax, eax
je 0x4095c0
mov byte [esp + 0x58], 1
mov byte [esp + 0x57], 7
mov byte [esp + 0x56], 3
mov edi, ebx
jmp 0x4095d3
mov edi, dword [esp + 0x14]
mov byte [esp + 0x58], 0
mov byte [esp + 0x56], 2
mov byte [esp + 0x57], 0xb
lea ecx, [esp + 0xa4]
mov byte [esp + 0x170], 0xd
call fcn.005ed430
mov eax, dword [esi]
mov edx, dword [eax + 0x38]
mov ecx, esi
call edx
push eax
lea ecx, [esp + 0x38]
call fcn.005edbf0
fldz
movzx ecx, word [esp + 0x24]
mov ax, word [esp + 0x20]
mov edx, dword [esp + 0x180]
mov word [esp + 0x50], ax
mov eax, ecx
shl eax, 5
add eax, dword [edx + 0x14]
mov edx, dword [esp + 0x184]
mov dword [esp + 0x40], 3
xor esi, esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], 4
mov dword [esp + 0x4c], ebx
movzx eax, word [eax + 0x10]
mov dword [esp + 0x68], eax
mov eax, dword [edx + 0x18]
lea ecx, [ecx + ecx*2]
lea eax, [eax + ecx*4]
movzx ecx, byte [eax + 8]
fstp dword [esp + 0x78]
lea edx, [esp + 0xc0]
push edx
lea eax, [esp + 0x38]
and ecx, ebx
push eax
mov dword [esp + 0x78], ecx
mov byte [esp + 0x85], 0
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
call fcn.005edb00
add esp, 8
test eax, eax
je 0x40972e
lea ecx, [esp + 0xb4]
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.005edb00
add esp, 8
test eax, eax
je 0x40972e
cmp dword [ebp + 0x20], ebx
jne 0x4096b3
cmp edi, ebx
je 0x4096ca
mov eax, dword [esp + 0x7d]
mov ecx, dword [esp + 0x57]
push eax
push ecx
mov ecx, dword [esp + 0x9c]
call dword [sym.imp.BMA_C9.dll_public:_bool___thiscall_BMAIfBD::GetImportElement_unsigned_char__unsigned_char_]
sub esp, 0xc
lea edx, [esp + 0xa4]
mov ecx, esp
mov dword [esp + 0x98], esp
push edx
call fcn.005ee8e0
sub esp, 0xc
lea eax, [esp + 0x4c]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
mov byte [esp + 0x18c], 0x14
call fcn.005edb30
mov ecx, ebp
mov byte [esp + 0x188], 0xd
call fcn.00406e50
xor ecx, ecx
cmp eax, esi
setne cl
mov dword [esp + 0x80], ecx
cmp dword [ebp + 0x1c], esi
jne 0x40972e
cmp byte [esp + 0x56], 3
je 0x40972e
mov dword [esp + 0x84], esi
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
lea edx, [esp + 0x2c]
push edx
push eax
call fcn.00407dd0
mov ecx, eax
call fcn.00406170
add dword [esp + 0x20], ebx
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x64]
inc eax
cmp eax, dword [edx + 0x3c]
mov dword [esp + 0x24], eax
jl 0x409370
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi + 0x64]
push 2
call fcn.004e2900
xor ebp, ebp
mov edi, 1
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x6c], edi
cmp dword [esi + 0x30], ebp
je 0x4097da
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x48]
call eax
test eax, eax
je 0x4097da
mov ecx, dword [esp + 0x2c]
mov esi, ecx
cmp ecx, ebp
je 0x4097da
call fcn.004b0b60
test eax, eax
je 0x4097da
mov ecx, esi
call fcn.004b0b60
mov dword [esp + 0x30], eax
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x3c]
call eax
mov esi, dword [esp + 0x180]
movzx eax, ax
shl eax, 5
add eax, dword [esi + 8]
movzx eax, word [eax + 0x10]
movzx ecx, ax
mov dword [esp + 0x6c], ecx
jmp 0x4097e1
mov esi, dword [esp + 0x180]
push str.BOARD_FIGURE
lea ecx, [esp + 0x38]
call fcn.005edbf0
mov eax, dword [esi + 8]
mov ebx, dword [esp + 0x20]
add eax, 0x40
mov dword [esp + 0x40], 3
mov byte [esp + 0x58], 1
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], 4
mov dword [esp + 0x4c], edi
mov word [esp + 0x50], bx
mov byte [esp + 0x56], 3
mov byte [esp + 0x57], 0xa
movzx eax, word [eax + 0x10]
movzx edx, ax
mov eax, dword [esp + 0x184]
mov eax, dword [eax + 0xc]
add eax, 0x18
mov dword [esp + 0x68], edx
test byte [eax + 8], 1
je 0x409847
mov dword [esp + 0x70], edi
cmp dword [esp + 0x198], edi
jne 0x409859
mov ecx, dword [esp + 0x1c]
fld dword [ecx + 0x5c]
jmp 0x40985b
fldz
push 0x633c9c
fstp dword [esp + 0x7c]
lea ecx, [esp + 0x60]
mov byte [esp + 0x5d], 0
call fcn.005edbf0
mov edx, dword [esp + 0x57]
mov ecx, dword [esp + 0x94]
push ebp
push edx
mov byte [esp + 0x85], 0
mov dword [esp + 0x88], edi
mov dword [esp + 0x8c], edi
call dword [sym.imp.BMA_C9.dll_public:_bool___thiscall_BMAIfBD::GetImportElement_unsigned_char__unsigned_char_]
movzx eax, al
cmp eax, edi
jne 0x40990f
sub esp, 0xc
lea eax, [esp + 0xa4]
mov ecx, esp
mov dword [esp + 0x98], esp
push eax
call fcn.005ee8e0
sub esp, 0xc
lea edx, [esp + 0x4c]
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
mov byte [esp + 0x18c], 0x15
call fcn.005edb30
mov ecx, dword [esp + 0x34]
mov byte [esp + 0x188], 0xd
call fcn.00406e50
xor ecx, ecx
cmp eax, edi
sete cl
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
push eax
call fcn.00407dd0
mov ecx, eax
call fcn.00406170
add ebx, edi
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 0x64]
push 5
call fcn.004e2900
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x6c], edi
cmp dword [edx + 0x30], ebp
je 0x40997c
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x48]
call eax
test eax, eax
je 0x40997c
mov ecx, dword [esp + 0x2c]
mov ebp, ecx
test ecx, ecx
je 0x40997a
call fcn.004b0b60
test eax, eax
je 0x40997a
mov ecx, ebp
call fcn.004b0b60
mov dword [esp + 0x30], eax
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x3c]
call eax
movzx eax, ax
shl eax, 5
add eax, dword [esi + 8]
movzx eax, word [eax + 0x10]
movzx ecx, ax
mov dword [esp + 0x6c], ecx
xor ebp, ebp
push str.LAYOUT_AREA
lea ecx, [esp + 0x38]
call fcn.005edbf0
mov eax, dword [esi + 8]
add eax, 0xa0
mov dword [esp + 0x40], 3
mov byte [esp + 0x58], 1
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], 4
mov dword [esp + 0x4c], edi
mov word [esp + 0x50], bx
mov byte [esp + 0x56], 4
mov byte [esp + 0x57], 7
movzx eax, word [eax + 0x10]
movzx edx, ax
mov eax, dword [esp + 0x184]
mov eax, dword [eax + 0xc]
add eax, 0x3c
mov dword [esp + 0x68], edx
test byte [eax + 8], 1
je 0x4099e0
mov dword [esp + 0x70], edi
fldz
push 0x633c9c
lea ecx, [esp + 0x60]
fstp dword [esp + 0x7c]
mov byte [esp + 0x5d], 0
call fcn.005edbf0
mov ecx, dword [esp + 0x57]
mov ebx, dword [esp + 0x94]
mov esi, dword [sym.imp.BMA_C9.dll_public:_bool___thiscall_BMAIfBD::GetImportElement_unsigned_char__unsigned_char_]
push ebp
push ecx
mov ecx, ebx
mov byte [esp + 0x85], 0
mov dword [esp + 0x88], edi
mov dword [esp + 0x8c], edi
call esi
movzx eax, al
cmp eax, ebp
jne 0x409a3a
mov edx, dword [esp + 0x57]
push edi
push edx
mov ecx, ebx
call esi
movzx eax, al
cmp eax, edi
jne 0x409aa9
sub esp, 0xc
lea eax, [esp + 0xa4]
mov ecx, esp
mov dword [esp + 0x98], esp
push eax
call fcn.005ee8e0
sub esp, 0xc
lea edx, [esp + 0x4c]
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
mov byte [esp + 0x18c], 0x16
call fcn.005edb30
mov ecx, dword [esp + 0x34]
mov byte [esp + 0x188], 0xd
call fcn.00406e50
xor ecx, ecx
cmp eax, edi
sete cl
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
push eax
call fcn.00407dd0
mov ecx, eax
call fcn.00406170
lea ecx, [esp + 0x2c]
mov byte [esp + 0x170], 5
call fcn.00406110
lea ecx, [esp + 0xb4]
mov byte [esp + 0x170], 4
call fcn.005ed430
lea ecx, [esp + 0xc0]
mov byte [esp + 0x170], 2
call fcn.005ed430
lea ecx, [esp + 0x98]
mov byte [esp + 0x170], 0
call fcn.005ee6d0
lea ecx, [esp + 0x188]
mov dword [esp + 0x170], 0xffffffff
call fcn.005ed430
mov ecx, dword [esp + 0x168]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x160
ret 0x28