Function at 0x1000f970
Capabilities:
Get common file path
Write file on windows

Disassembly:
push 0x670
mov eax, 0x1001580f
call fcn.10013e2a
mov eax, dword [ebp + 8]
xor edi, edi
cmp byte [0x100216f0], 0
mov ebx, eax
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x634], eax
mov dword [ebp - 0x63c], ebx
mov dword [ebp - 0x630], ecx
mov dword [ebp - 0x638], esi
jne 0x1000f9e9
push 0x100205cf
mov byte [0x100205cf], 1
mov dword [ebp - 4], edi
call fcn.1000ff05
pop ecx
jmp 0x1000f9d8
mov ecx, dword [ebp - 0x630]
or dword [ebp - 4], 0xffffffff
mov byte [0x100216f0], 1
cmp dword [ebx + 0x14], 0xffffffff
jne 0x1000fd86
mov eax, dword [ebx + 0xc]
add eax, 0x310
push eax
push ecx
call fcn.1000ff05
pop ecx
pop ecx
cmp al, 1
je 0x1000fcd3
cmp byte [0x100216f0], 0
je 0x1000fa22
cmp byte [0x100205cf], 0
jne 0x1000fd86
lea eax, [ebp - 0x67c]
push eax
push dword [ebp - 0x630]
call fcn.1000ff05
pop ecx
pop ecx
test al, al
je 0x1000fb92
push str._crossdomain.xml
push dword [ebp - 0x650]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
pop ecx
pop ecx
test eax, eax
jne 0x1000fb86
mov eax, dword [ebx + 0xc]
cmp byte [eax + 0x5d4], 0
je 0x1000fb86
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 2
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
cmp eax, 0x104
ja 0x1000fd86
test eax, eax
je 0x1000fd86
lea eax, [ebp - 0x118]
push eax
push edi
push 0x10018bbc
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
test eax, eax
je 0x1000fd86
push edi
push 0x80
push 2
push edi
push edi
push 0xc0000000
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [ebx + 0x14], eax
cmp eax, 0xffffffff
je 0x1000fd86
push edi
push SysReAllocString
push str._cross_domain_policy__n_allow_access_from_domain___secure_false____n__cross_domain_policy_
call fcn.1000ff05
add esp, 0xc
lea ecx, [ebp - 0x640]
push edi
push ecx
push eax
push str._cross_domain_policy__n_allow_access_from_domain___secure_false____n__cross_domain_policy_
push dword [ebx + 0x14]
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
je 0x1000fd86
push dword [ebx + 0x14]
call dword [sym.imp.kernel32.dll_CloseHandle]
test eax, eax
je 0x1000fd86
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [ebx + 0x14], eax
cmp eax, 0xffffffff
je 0x1000fd86
push esi
lea ecx, [ebx + 0x10]
call fcn.1000ff05
push 0x104
lea eax, [ebp - 0x62c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x118]
push eax
push edi
push 0xfde9
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x62c]
jmp 0x1000fc98
push dword [ebp - 0x678]
call fcn.10013fb8
pop ecx
mov eax, dword [ebx + 0xc]
cmp dword [eax + 0x5f0], edi
je 0x1000fd86
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push dword [ebp - 0x630]
mov dword [ebp - 0x634], edi
push edi
push 0xfde9
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [ebp - 0x640], eax
test eax, eax
jle 0x1000fd86
push eax
call fcn.1000ff05
mov dword [ebp - 0x63c], eax
pop ecx
test eax, eax
jne 0x1000fbe5
xor eax, eax
jmp 0x1000fd8b
push edi
push edi
push dword [ebp - 0x640]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x630]
push edi
push 0xfde9
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x634]
mov dword [ebp - 4], 4
push eax
push dword [ebp - 0x63c]
call fcn.1000ff05
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
push dword [ebp - 0x63c]
mov dword [ebp - 0x640], eax
call fcn.10013fb8
cmp dword [ebp - 0x640], 0
pop ecx
jne 0x1000fd86
push 0x104
lea eax, [ebp - 0x424]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x634]
push edi
push 0xfde9
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [ebx + 0x14], eax
cmp eax, 0xffffffff
je 0x1000fd86
push esi
lea ecx, [ebx + 0x10]
call fcn.1000ff05
lea eax, [ebp - 0x424]
mov edi, dword [ebp - 0x638]
mov esi, dword [esi]
push eax
push 0xe
mov ecx, dword [esi + 0x10]
push edi
call dword [0x100173b4]
call dword [esi + 0x10]
mov esi, dword [edi]
mov eax, 0x3e8
push eax
push eax
push 0xd
mov ecx, dword [esi + 0x14]
push edi
call dword [0x100173b4]
call dword [esi + 0x14]
jmp 0x1000fbde
cmp byte [0x100216f0], 0
je 0x1000fce5
cmp byte [0x100205cf], 0
jne 0x1000fcf1
mov edx, dword [ebx + 0xc]
cmp byte [edx + 0x5d4], 0
jne 0x1000fd2b
mov edx, dword [ebx + 0xc]
cmp dword [edx + 0x5cc], edi
je 0x1000fd2b
mov ecx, dword [edx + 0x5ec]
lea eax, [edx + 0x2d4]
push eax
push edx
push ecx
mov esi, dword [ecx]
mov ecx, dword [esi + 0x10]
call dword [0x100173b4]
call dword [esi + 0x10]
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp - 0x634]
mov dword [eax + 0x5cc], edi
mov edx, dword [edx + 0xc]
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
lea eax, [edx + 4]
push eax
call dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [ebx + 0x14], eax
cmp eax, 0xffffffff
je 0x1000fd86
mov edi, dword [ebp - 0x638]
lea ecx, [ebx + 0x10]
push edi
call fcn.1000ff05
mov eax, dword [ebx + 0xc]
mov esi, dword [edi]
add eax, 4
push eax
push 0xe
push edi
mov ecx, dword [esi + 0x10]
call dword [0x100173b4]
call dword [esi + 0x10]
mov eax, dword [ebx + 0xc]
mov esi, dword [edi]
add eax, 0x20c
push eax
push 0xd
jmp 0x1000fca3
mov eax, 0x80004005
call fcn.10013d77
ret 0x18