Function at 0x1029c79
Capabilities:
Write file on windows

Disassembly:
push 0x28
mov eax, 0x104be9a
call fcn.010411e8
mov ebx, ecx
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x1029c9d
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1029dfd
cmp dword [ebp + 0xc], esi
je 0x1029c8e
push 0x10077d0
lea ecx, [ebp - 0x34]
call dword [sym.imp.unbcl.dll_public:_void___thiscall_UnBCL::String::constructor_unsigned_short_int_const__]
push eax
mov dword [ebp - 4], esi
call dword [sym.imp.unbcl.dll_public:_static_class_UnBCL::String____stdcall_UnBCL::Directory::GetTempPathName_void_]
push eax
call dword [sym.imp.unbcl.dll_public:_static_class_UnBCL::String____stdcall_UnBCL::Path::Combine_class_UnBCL::String_const___class_UnBCL::String_const__]
mov edi, dword [sym.imp.unbcl.dll_public:_void___thiscall_UnBCL::SmartPtr_class_UnBCL::String_::constructor_class_UnBCL::String__]
push eax
lea ecx, [ebp - 0x1c]
call edi
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 2
call dword [sym.imp.unbcl.dll_public_virtual:_void___thiscall_UnBCL::String::destructor_void_]
mov ecx, dword [ebp + 0xc]
mov esi, dword [sym.imp.unbcl.dll_public:_unsigned_short_int_const____thiscall_UnBCL::String::get_CString_void_const]
call esi
mov ecx, dword [ebp + 8]
push eax
call esi
push eax
push 0x1007688
call dword [sym.imp.unbcl.dll_public:_static_class_UnBCL::String____cdecl_UnBCL::String::Format_unsigned_short_int_const__]
add esp, 0xc
push eax
lea ecx, [ebp - 0x24]
call edi
mov edi, dword [sym.imp.unbcl.dll_public:_class_UnBCL::String____thiscall_UnBCL::SmartPtr_class_UnBCL::String_::operator___void_const]
push 0x1007680
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call edi
mov ecx, eax
call esi
push eax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.msvcrt.dll__wfopen_s]
add esp, 0xc
test eax, eax
je 0x1029d47
mov esi, dword [sym.imp.unbcl.dll_public_virtual:_void___thiscall_UnBCL::SmartPtr_class_UnBCL::String_::destructor_void_]
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call esi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call esi
jmp 0x1029c96
push dword [ebp - 0x10]
lea eax, [ebp - 0x14]
push 1
push 2
push eax
mov dword [ebp - 0x14], 0xfeff
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x1029d80
lea ecx, [ebp - 0x24]
call edi
mov ecx, eax
call esi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll_fwprintf]
pop ecx
pop ecx
test eax, eax
jg 0x1029d8c
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll_fclose]
pop ecx
jmp 0x1029d2a
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll_fclose]
push 0xec
call sub.MFC42u.dll_operatornew
pop ecx
pop ecx
mov dword [ebp + 0xc], eax
xor eax, eax
mov byte [ebp - 4], 4
cmp dword [ebp + 0xc], eax
je 0x1029dcf
push eax
push 0x8004
lea ecx, [ebp - 0x1c]
call edi
mov ecx, eax
call esi
mov ecx, dword [ebp + 0xc]
push eax
lea eax, [ebx + 0x1fc]
push eax
push ebx
call fcn.010377c9
push 1
mov ecx, eax
mov byte [ebp - 4], 3
mov dword [ebx + 0x1b4], eax
call fcn.0103737b
mov esi, dword [sym.imp.unbcl.dll_public_virtual:_void___thiscall_UnBCL::SmartPtr_class_UnBCL::String_::destructor_void_]
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call esi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call esi
xor eax, eax
inc eax
call fcn.010412d4
ret 8