Function at 0x411bc0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41823a
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x42a018]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
mov dword [ebp - 0x1c], edi
mov ebx, dword [ebp + 0x10]
mov ecx, 1
mov dword [ebp - 4], ecx
mov eax, dword [ebx]
cmp eax, edi
jl 0x412190
mov esi, dword [ebp + 8]
cmp dword [esi + 0xb4], eax
jle 0x412190
mov ecx, dword [esi + 0xb0]
push edi
push 0x42aef8
lea eax, [ecx + eax*8]
mov eax, dword [eax + 4]
push 0x42a954
push edi
push eax
call sub.MSVCR80.dll___RTDynamicCast
add esp, 0x14
test eax, eax
je 0x411c6a
mov eax, dword [esi + 0xb0]
mov edx, dword [ebx]
mov esi, dword [ebp + 0xc]
lea eax, [eax + edx*8]
mov dword [esi + 4], edi
mov dword [esi], vtable.atlast::utils::SmartPtr_class_atlast::sketchup::ISketchUpMaterial___class_PointerCompare_class_atlast::utils::IRefCountObject___.0
mov ecx, dword [eax + 4]
cmp ecx, edi
mov dword [esi + 4], ecx
je 0x411c5e
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 0x1c], 1
jmp 0x41219f
mov ecx, dword [ebx]
push ecx
mov ecx, dword [esi + 0xf0]
add ecx, 0x4d0
call dword [sym.imp.opennurbs.dll_public:_class_ON_Material____thiscall_ON_ClassArray_class_ON_Material_::operator___int_]
mov ebx, eax
mov dword [ebp - 0x3c], vtable.atlast::utils::SmartPtr_class_atlast::sketchup::ISketchUpMaterial___class_PointerCompare_class_atlast::utils::IRefCountObject___.0
mov dword [ebp - 0x38], edi
push edi
push 0x42aef8
push 0x42a954
mov byte [ebp - 4], 2
mov edx, dword [ebp + 0x18]
push edi
push edx
call sub.MSVCR80.dll___RTDynamicCast
add esp, 0x14
test eax, eax
je 0x411cbb
lea edi, [ebp + 0x14]
lea esi, [ebp - 0x3c]
call fcn.00415a70
jmp 0x411d59
mov esi, dword [esi + 0xa0]
push edi
push 0x42b334
push 0x42a954
push edi
push esi
call sub.MSVCR80.dll___RTDynamicCast
mov edx, dword [eax]
mov edx, dword [edx + 0x28]
add esp, 0x14
lea ecx, [ebp - 0x34]
push ecx
mov ecx, eax
call edx
push edi
push 0x42b364
push 0x42a954
mov byte [ebp - 4], 3
mov eax, dword [eax + 4]
push edi
push eax
call sub.MSVCR80.dll___RTDynamicCast
mov edi, eax
mov esi, dword [edi]
add esp, 0x14
mov ecx, ebx
add esi, 0x2c
call dword [sym.imp.opennurbs.dll_public:_wchar_t_const____thiscall_ON_Material::MaterialName_void_const]
mov edx, dword [esi]
push eax
lea eax, [ebp - 0x44]
push eax
mov ecx, edi
call edx
mov edi, eax
lea esi, [ebp - 0x3c]
mov byte [ebp - 4], 4
call fcn.00415a70
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x40]
test ecx, ecx
mov dword [ebp - 0x44], vtable.atlast::utils::SmartPtr_class_atlast::sketchup::ISketchUpMaterial___class_PointerCompare_class_atlast::utils::IRefCountObject___.0
je 0x411d40
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x30]
test ecx, ecx
mov dword [ebp - 0x34], vtable.atlast::utils::SmartPtr_class_atlast::sketchup::ISketchUpMaterials___class_PointerCompare_class_atlast::utils::IRefCountObject___.0
je 0x411d59
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov esi, dword [ebp - 0x38]
push 0
push 0x42aef8
push 0x42a954
push 0
push esi
call sub.MSVCR80.dll___RTDynamicCast
add esp, 0x14
test eax, eax
jne 0x411dc3
test esi, esi
mov edi, dword [ebp + 0xc]
mov dword [edi], vtable.atlast::utils::SmartPtr_class_atlast::sketchup::ISketchUpMaterial___class_PointerCompare_class_atlast::utils::IRefCountObject___.0
mov dword [edi + 4], eax
mov dword [ebp - 0x1c], 1
mov byte [ebp - 4], 1
je 0x411d9b
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
mov byte [ebp - 4], 0
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x411dad
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
lea eax, [ebp - 0x14]
push eax
mov ecx, ebx
call dword [sym.imp.opennurbs.dll_public:_class_ON_Color___thiscall_ON_Material::Diffuse_void_]
lea ecx, [ebp - 0x14]
call dword [sym.imp.opennurbs.dll_public:_int___thiscall_ON_Color::Red_void_const]
lea ecx, [ebp - 0x14]
mov byte [ebp - 0x20], al
call dword [sym.imp.opennurbs.dll_public:_int___thiscall_ON_Color::Green_void_const]
lea ecx, [ebp - 0x14]
mov byte [ebp - 0x24], al
call dword [sym.imp.opennurbs.dll_public:_int___thiscall_ON_Color::Blue_void_const]
lea ecx, [ebp - 0x14]
mov byte [ebp - 0x28], al
call dword [sym.imp.opennurbs.dll_public:_int___thiscall_ON_Color::Alpha_void_const]
push 0
push 0x42aef8
push 0x42a954
push 0
push esi
mov byte [ebp - 0x2c], al
call sub.MSVCR80.dll___RTDynamicCast
mov ecx, dword [ebp - 0x2c]
mov edx, dword [eax]
mov edx, dword [edx + 0x30]
add esp, 0x14
push ecx
mov ecx, dword [ebp - 0x28]
push ecx
mov ecx, dword [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 0x20]
push ecx
mov ecx, eax
call edx
push 0
push 0x42aef8
push 0x42a954
push 0
push esi
call sub.MSVCR80.dll___RTDynamicCast
mov edi, eax
mov esi, dword [edi]
add esp, 0x14
mov ecx, ebx
add esi, 0x34
call dword [sym.imp.opennurbs.dll_public:_double___thiscall_ON_Material::Transparency_void_const]
mov eax, dword [esi]
sub esp, 8
mov ecx, edi
fstp qword [esp]
call eax
lea edi, [ebx + 0x64]
mov ecx, edi
mov dword [ebp - 0x2c], edi
call dword [sym.imp.opennurbs.dll_public:_int___thiscall_ON_ClassArray_class_ON_Texture_::Count_void_const]
xor esi, esi
test eax, eax
mov dword [ebp - 0x28], eax
jle 0x412101
lea esp, [esp]
mov ebx, dword [sym.imp.opennurbs.dll_public:_class_ON_Texture_const____thiscall_ON_ClassArray_class_ON_Texture_::operator___int_const]
push esi
mov ecx, edi
call ebx
cmp dword [eax + 0x28], 1
jne 0x411eb0
push esi
mov ecx, edi
call ebx
cmp byte [eax + 0x25], 1
jne 0x411eb0
push esi
mov ecx, edi
call ebx
mov ecx, eax
add ecx, 0x20
call dword [sym.imp.opennurbs.dll_public:_int___thiscall_ON_wString::Length_void_const]
test eax, eax
jne 0x411ebd
add esi, 1
cmp esi, dword [ebp - 0x28]
jl 0x411e80
jmp 0x412101
cmp esi, 0xffffffff
mov dword [ebp - 0x20], esi
je 0x412101
push 0
push esi
mov ecx, edi
call ebx
mov ecx, eax
add ecx, 0x20
call dword [sym.imp.opennurbs.dll_public:_wchar_t_const____thiscall_ON_wString::operator_wchar_t_const__void_const]
push eax
call dword [sym.imp.MSVCR80.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
je 0x411f4c
mov ecx, dword [ebp - 0x38]
push 0
push 0x42aef8
push 0x42a954
push 0
push ecx
call sub.MSVCR80.dll___RTDynamicCast
mov dword [ebp - 0x2c], eax
mov eax, dword [eax]
add esp, 0x14
add eax, 0x24
push esi
mov ecx, edi
mov dword [ebp - 0x28], eax
call ebx
mov ecx, eax
add ecx, 0x20
call dword [sym.imp.opennurbs.dll_public:_wchar_t_const____thiscall_ON_wString::operator_wchar_t_const__void_const]
mov ecx, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 0x44]
push edx
mov edx, dword [eax]
call edx
mov ecx, dword [ebp - 0x40]
test ecx, ecx
mov dword [ebp - 0x44], vtable.atlast::utils::SmartPtr_class_atlast::sketchup::ISketchUpTexture___class_PointerCompare_class_atlast::utils::IRefCountObject___.0
je 0x412101
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
jmp 0x412101
push esi
mov ecx, edi
call ebx
mov ecx, eax
add ecx, 0x20
call dword [sym.imp.opennurbs.dll_public:_wchar_t_const____thiscall_ON_wString::operator_wchar_t_const__void_const]
mov edi, dword [ebp + 8]
push eax
call fcn.00411a80
push eax
call dword [sym.imp.opennurbs.dll_public:_static_class_ON_EmbeddedBitmap_const____cdecl_ON_EmbeddedBitmap::Cast_class_ON_Object_const__]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x412101
cmp dword [ebx + 0x28], 0
je 0x412101
cmp dword [ebx + 0x2c], 0
jbe 0x412101
lea ecx, [ebp - 0x18]
call dword [sym.imp.opennurbs.dll_public:_void___thiscall_ON_wString::constructor_void_]
mov ecx, dword [ebp - 0x2c]
push esi
mov byte [ebp - 4], 5
call dword [sym.imp.opennurbs.dll_public:_class_ON_Texture_const____thiscall_ON_ClassArray_class_ON_Texture_::operator___int_const]
mov ecx, eax
add ecx, 0x20
call dword [sym.imp.opennurbs.dll_public:_wchar_t_const____thiscall_ON_wString::operator_wchar_t_const__void_const]
mov ecx, edi
push ecx
lea esi, [ebp - 0x18]
mov edi, eax
call fcn.00411b20
mov esi, eax
test esi, esi
je 0x41202a
mov edx, dword [ebx + 0x2c]
mov eax, dword [ebx + 0x28]
push esi
push edx
push 1
push eax
call dword [sym.imp.MSVCR80.dll_fwrite]
cmp dword [ebx + 0x2c], eax
push esi
sete bl
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 0x14
test bl, bl
je 0x412012
lea eax, [ebp - 0x3c]
call fcn.00412500
mov edi, eax
mov esi, dword [edi]
lea ecx, [ebp - 0x18]
add esi, 0x24
call dword [sym.imp.opennurbs.dll_public:_wchar_t_const____thiscall_ON_wString::operator_wchar_t_const__void_const]
mov edx, dword [esi]
push eax
lea ecx, [ebp - 0x44]
push ecx
mov ecx, edi
call edx
lea ecx, [ebp - 0x44]
call fcn.00412560
lea ecx, [ebp - 0x18]
call dword [sym.imp.opennurbs.dll_public:_wchar_t_const____thiscall_ON_wString::operator_wchar_t_const__void_const]
push eax
call dword [sym.imp.MSVCR80.dll__wunlink]
add esp, 4
jmp 0x4120f4
mov eax, dword [ebx]
mov edx, dword [eax + 0x38]
mov ecx, ebx
call edx
mov edi, eax
mov eax, dword [ebx]
mov edx, dword [eax + 0x34]
mov ecx, ebx
call edx
mov dword [ebp - 0x28], eax
mov eax, dword [ebx]
mov edx, dword [eax + 0x3c]
mov ecx, ebx
call edx
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x3c]
call fcn.00412500
mov ecx, dword [ebp - 0x24]
imul ecx, dword [ebp - 0x28]
mov esi, dword [eax]
imul ecx, edi
mov dword [ebp - 0x30], eax
mov eax, dword [ebx]
mov edx, dword [eax + 0x48]
push ecx
mov ecx, ebx
add esi, 0x28
call edx
mov ecx, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [esi]
push edi
push ecx
mov ecx, dword [ebp - 0x30]
lea edx, [ebp - 0x44]
push edx
call eax
push 0
push 0x42b398
push 0x42a954
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x40]
push 0
push ecx
call sub.MSVCR80.dll___RTDynamicCast
add esp, 0x14
test eax, eax
je 0x4120e8
mov edx, dword [ebp - 0x40]
push 0
push 0x42b398
push 0x42a954
push 0
push edx
call sub.MSVCR80.dll___RTDynamicCast
mov ecx, dword [ebp - 0x2c]
mov edi, eax
mov eax, dword [ebp - 0x20]
mov esi, dword [edi]
add esp, 0x14
push eax
add esi, 0x44
call dword [sym.imp.opennurbs.dll_public:_class_ON_Texture_const____thiscall_ON_ClassArray_class_ON_Texture_::operator___int_const]
mov ecx, eax
add ecx, 0x20
call dword [sym.imp.opennurbs.dll_public:_wchar_t_const____thiscall_ON_wString::operator_wchar_t_const__void_const]
mov edx, dword [esi]
push eax
mov ecx, edi
call edx
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 5
call fcn.00412560
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call dword [sym.imp.opennurbs.dll_public:_void___thiscall_ON_wString::destructor_void_]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xb0]
mov esi, dword [ebp - 0x38]
lea edi, [eax + ecx*8]
mov ecx, dword [edi + 4]
cmp ecx, esi
je 0x412137
test ecx, ecx
je 0x412127
mov edx, dword [ecx]
mov eax, dword [edx + 8]
call eax
test esi, esi
mov dword [edi + 4], esi
je 0x412137
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
test esi, esi
mov edi, dword [ebp + 0xc]
mov dword [edi], vtable.atlast::utils::SmartPtr_class_atlast::sketchup::ISketchUpMaterial___class_PointerCompare_class_atlast::utils::IRefCountObject___.0
mov dword [edi + 4], esi
je 0x412150
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
test esi, esi
mov dword [ebp - 0x1c], 1
mov byte [ebp - 4], 1
je 0x412168
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov byte [ebp - 4], 0
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x41217a
mov edx, dword [ecx]
mov eax, dword [edx + 8]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov esi, dword [ebp + 0xc]
mov dword [esi], vtable.atlast::utils::SmartPtr_class_atlast::sketchup::ISketchUpMaterial___class_PointerCompare_class_atlast::utils::IRefCountObject___.0
mov dword [esi + 4], edi
mov dword [ebp - 0x1c], ecx
mov byte [ebp - 4], 0
mov ecx, dword [ebp + 0x18]
cmp ecx, edi
je 0x4121b1
mov edx, dword [ecx]
mov eax, dword [edx + 8]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14