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

Disassembly:
push 0x66c
mov eax, 0x100124e1
call fcn.1001109f
mov edi, dword [ebp + 8]
xor esi, esi
cmp byte [0x1001c6a4], 0
mov ecx, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x638], edi
mov dword [ebp - 0x630], ecx
mov dword [ebp - 0x63c], ebx
jne 0x1000d8ce
push 0x1001b5d0
mov byte [0x1001b5d0], 1
mov dword [ebp - 4], esi
call fcn.10005573
or dword [ebp - 4], 0xffffffff
pop ecx
jmp 0x1000d8c1
mov ecx, dword [ebp - 0x630]
mov byte [0x1001c6a4], 1
cmp dword [edi + 0x14], 0xffffffff
je 0x1000d8de
mov eax, 0x80004005
jmp 0x1000dc3d
mov eax, dword [edi + 0xc]
add eax, 0x310
push eax
push ecx
call fcn.10005573
pop ecx
pop ecx
cmp al, 1
je 0x1000db93
cmp byte [0x1001c6a4], 0
je 0x1000d909
cmp byte [0x1001b5d0], 0
jne 0x1000d8d4
lea eax, [ebp - 0x678]
push eax
push dword [ebp - 0x630]
call fcn.10005573
movzx eax, al
pop ecx
pop ecx
test eax, eax
je 0x1000da85
push str._crossdomain.xml
push dword [ebp - 0x64c]
call dword [sym.imp.MSVCR120.dll__stricmp]
pop ecx
pop ecx
test eax, eax
jne 0x1000da79
mov eax, dword [edi + 0xc]
cmp byte [eax + 0x5d4], 0
je 0x1000da79
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 2
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
cmp eax, 0x104
ja 0x1000d8d4
test eax, eax
je 0x1000d8d4
lea eax, [ebp - 0x118]
push eax
push esi
push 0x100144ec
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
test eax, eax
je 0x1000d8d4
push esi
push 0x80
push 2
push esi
push esi
push 0xc0000000
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [edi + 0x14], eax
cmp eax, 0xffffffff
je 0x1000d8d4
push esi
push SysReAllocString
push str._cross_domain_policy__n_allow_access_from_domain___secure_false____n__cross_domain_policy_
call fcn.10005573
add esp, 0xc
lea ecx, [ebp - 0x634]
push esi
push ecx
push eax
push str._cross_domain_policy__n_allow_access_from_domain___secure_false____n__cross_domain_policy_
push dword [edi + 0x14]
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
je 0x1000d8d4
push dword [edi + 0x14]
call dword [sym.imp.kernel32.dll_CloseHandle]
test eax, eax
je 0x1000d8d4
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [edi + 0x14], eax
cmp eax, 0xffffffff
je 0x1000d8d4
push ebx
lea ecx, [edi + 0x10]
call fcn.10005573
push 0x104
lea eax, [ebp - 0x62c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x118]
push eax
push esi
push 0xfde9
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
lea ecx, [ebp - 0x62c]
mov eax, dword [ebx]
push ecx
push 0xe
push ebx
call dword [eax + 0x10]
jmp 0x1000dc2c
push dword [ebp - 0x674]
call sub.MSVCR120.dll_void___cdecl_operator_delete___void__
pop ecx
mov eax, dword [edi + 0xc]
cmp dword [eax + 0x5f0], esi
je 0x1000d8d4
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push dword [ebp - 0x630]
mov dword [ebp - 0x638], esi
push esi
push 0xfde9
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [ebp - 0x634], eax
test eax, eax
jle 0x1000d8d4
push eax
call fcn.10005573
mov dword [ebp - 0x63c], eax
pop ecx
test eax, eax
je 0x1000dc3b
push esi
push esi
push dword [ebp - 0x634]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x630]
push esi
push 0xfde9
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x638]
mov dword [ebp - 4], 4
push eax
push dword [ebp - 0x63c]
call fcn.10005573
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
push dword [ebp - 0x63c]
mov dword [ebp - 0x634], eax
call sub.MSVCR120.dll_void___cdecl_operator_delete___void__
cmp dword [ebp - 0x634], 0
pop ecx
jne 0x1000d8d4
push 0x104
lea eax, [ebp - 0x424]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x638]
push esi
push 0xfde9
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [edi + 0x14], eax
cmp eax, 0xffffffff
je 0x1000d8d4
push ebx
lea ecx, [edi + 0x10]
call fcn.10005573
lea ecx, [ebp - 0x424]
jmp 0x1000da65
cmp byte [0x1001c6a4], 0
je 0x1000dba5
cmp byte [0x1001b5d0], 0
jne 0x1000dbb1
mov eax, dword [edi + 0xc]
cmp byte [eax + 0x5d4], 0
jne 0x1000dbda
mov eax, dword [edi + 0xc]
cmp dword [eax + 0x5cc], esi
je 0x1000dbda
mov ecx, dword [eax + 0x5ec]
add eax, 0x2d4
push eax
push dword [edi + 0xc]
mov edx, dword [ecx]
push ecx
call dword [edx + 0x10]
mov eax, dword [edi + 0xc]
mov dword [eax + 0x5cc], esi
mov eax, dword [edi + 0xc]
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
add eax, 4
push eax
call dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [edi + 0x14], eax
cmp eax, 0xffffffff
je 0x1000d8d4
push ebx
lea ecx, [edi + 0x10]
call fcn.10005573
mov eax, dword [edi + 0xc]
mov ecx, dword [ebx]
add eax, 4
push eax
push 0xe
push ebx
call dword [ecx + 0x10]
mov eax, dword [edi + 0xc]
mov ecx, dword [ebx]
add eax, 0x20c
push eax
push 0xd
push ebx
call dword [ecx + 0x10]
mov eax, dword [ebx]
mov ecx, 0x3e8
push ecx
push ecx
push 0xd
push ebx
call dword [eax + 0x14]
xor eax, eax
call fcn.10010ff1
ret 0x18