Function at 0x1006d100
Capabilities:
Check if file exists
Create directory
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10170f46
mov eax, dword fs:[0]
push eax
mov eax, 0x223c
call fcn.100acf60
mov eax, dword [0x101d7c7c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
push 0x800
mov dword [ebp - 0x2248], eax
lea eax, [ebp - 0x1a10]
push 0
push eax
call fcn.10112750
add esp, 0xc
lea eax, [ebp - 0x1a10]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor eax, eax
mov dword [ebp - 0x2218], 0
mov dword [ebp - 0x2214], 7
mov word [ebp - 0x2228], ax
lea ecx, [ebp - 0x1a10]
mov dword [ebp - 4], eax
mov dword [ebp - 0x2230], eax
lea edx, [ecx + 2]
mov dword [ebp - 0x222c], 7
mov word [ebp - 0x2240], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1006d1a5
sub ecx, edx
lea eax, [ebp - 0x1a10]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2240]
call fcn.10012940
cmp dword [ebp - 0x2230], 0x104
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov byte [ebp - 4], 1
jbe 0x1006d1e4
mov bl, 1
jmp 0x1006d2db
push 0x800
lea eax, [ebp - 0x2210]
push 0
push eax
call fcn.10112750
push 0x800
lea eax, [ebp - 0x1210]
push 0
push eax
call fcn.10112750
cmp dword [ebp - 0x222c], 8
lea eax, [ebp - 0x2240]
cmovae eax, dword [ebp - 0x2240]
push eax
lea eax, [ebp - 0x2210]
push 0x400
push eax
call fcn.1013e0fc
push 0x100
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.10112750
add esp, 0x30
xor esi, esi
nop dword [eax + eax]
push 0x80
lea eax, [ebp - 0x110]
mov ecx, edi
push eax
call fcn.1006da20
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x2210]
push eax
lea eax, [ebp - 0x1210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push str..tmp
lea eax, [ebp - 0x1210]
push 0x400
push eax
call fcn.1013e027
add esp, 0xc
lea eax, [ebp - 0x1210]
push eax
call ebx
test eax, eax
je 0x1006d2ae
inc esi
cmp esi, 0xa
jl 0x1006d250
mov bl, 1
jmp 0x1006d2db
lea ecx, [ebp - 0x1210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1006d2b7
sub ecx, edx
lea eax, [ebp - 0x1210]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2228]
call fcn.10012940
xor bl, bl
mov edx, dword [ebp - 0x222c]
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x1006d31f
mov ecx, dword [ebp - 0x2240]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1006d315
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1006d5a6
push edx
push ecx
call fcn.100acb1e
add esp, 8
test bl, bl
jne 0x1006d543
cmp dword [ebp - 0x2214], 8
lea eax, [ebp - 0x2228]
cmovae eax, dword [ebp - 0x2228]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1006d365
cmp dword [ebp - 0x2214], 8
lea eax, [ebp - 0x2228]
push 0
cmovae eax, dword [ebp - 0x2228]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push 0x100
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.10112750
push 0x800
lea eax, [ebp - 0xa10]
push 0
push eax
call fcn.10112750
add esp, 0x18
lea eax, [ebp - 0x210]
mov ecx, edi
push 0x80
push eax
call fcn.1006da20
cmp dword [ebp - 0x2214], 8
lea eax, [ebp - 0x2228]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmovae eax, dword [ebp - 0x2228]
push eax
lea eax, [ebp - 0xa10]
push eax
call esi
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0xa10]
push eax
call esi
push str..tmp
lea eax, [ebp - 0xa10]
push 0x400
push eax
call fcn.1013e027
add esp, 0xc
mov dword [ebp - 0x2230], 0
xor eax, eax
mov dword [ebp - 0x222c], 7
lea ecx, [ebp - 0xa10]
mov word [ebp - 0x2240], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1006d414
sub ecx, edx
lea eax, [ebp - 0xa10]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2240]
call fcn.10012940
cmp dword [ebp - 0x222c], 8
lea eax, [ebp - 0x2240]
push 0x10195ba8
cmovae eax, dword [ebp - 0x2240]
push eax
lea eax, [ebp - 0x2244]
mov dword [ebp - 0x2244], 0
push eax
call fcn.10142094
mov ecx, dword [ebp - 0x2244]
add esp, 0xc
test ecx, ecx
jne 0x1006d47e
call fcn.1012fc6d
mov esi, dword [eax]
neg esi
jmp 0x1006d4b1
mov eax, dword [ebp - 0x2248]
cmp dword [eax + 0x14], 0x10
lea ebx, [eax + 0x10]
jb 0x1006d48f
mov eax, dword [eax]
push ecx
push dword [ebx]
push 1
push eax
call fcn.10145258
push dword [ebp - 0x2244]
mov esi, eax
call fcn.10141ba5
xor eax, eax
add esp, 0x14
cmp esi, dword [ebx]
cmovne esi, eax
mov edx, dword [ebp - 0x222c]
cmp edx, 8
jb 0x1006d4f1
mov ecx, dword [ebp - 0x2240]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1006d4e7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1006d5ab
push edx
push ecx
call fcn.100acb1e
add esp, 8
test esi, esi
jle 0x1006d543
cmp dword [ebp - 0x2214], 8
lea eax, [ebp - 0x2228]
cmovae eax, dword [ebp - 0x2228]
push eax
lea eax, [ebp - 0xa10]
push eax
call fcn.100e9c30
add esp, 8
test eax, eax
js 0x1006d543
lea eax, [ebp - 0x2228]
cmp edi, eax
je 0x1006d543
cmp dword [ebp - 0x2214], 8
mov ecx, edi
push dword [ebp - 0x2218]
cmovae eax, dword [ebp - 0x2228]
push eax
call fcn.10012940
cmp dword [edi + 0x10], 0
mov edx, dword [ebp - 0x2214]
setne bl
cmp edx, 8
jb 0x1006d586
mov ecx, dword [ebp - 0x2228]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1006d57c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1006d5b0
push edx
push ecx
call fcn.100acb1e
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100acb08
mov esp, ebp
pop ebp
ret 4
call fcn.1012fb57
call fcn.1012fb57
call fcn.1012fb57
int3