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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
mov eax, dword [0x10431dc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
push 0x103
lea eax, [ebp - 0x20b]
push ebx
push eax
mov byte [ebp - 0x20c], bl
call fcn.0100ddf9
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push 0x104
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
mov esi, 0x10016c4
jne 0x100a527
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01009d20
push ebx
mov edi, eax
push edi
push 0x747
push esi
call fcn.0101c3d2
cmp edi, ebx
jl 0x100aa51
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x100a53d
test al, 0x10
jne 0x100a56a
push ebx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x100a56a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01009d20
push ebx
mov edi, eax
push edi
push 0x752
push esi
call fcn.0101c3d2
cmp edi, ebx
jl 0x100aa51
push 0x10018c8
lea eax, [ebp - 0x20c]
push eax
push 0x10018c0
lea eax, [ebp - 0x310]
push 0x104
push eax
call fcn.0100a18a
add esp, 0x14
push ebx
mov edi, eax
push edi
push 0x75a
push esi
call fcn.0101c3d2
cmp edi, ebx
jl 0x100aa51
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x318], eax
jne 0x100a5ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01009d20
push ebx
mov edi, eax
push edi
push 0x765
push esi
call fcn.0101c3d2
cmp edi, ebx
jl 0x100aa51
push dword [0x1043034]
lea eax, [ebp - 0x108]
push 0x1001898
push 0x104
push eax
mov dword [ebp - 0x320], ebx
call fcn.0100a18a
add esp, 0x10
push ebx
mov edi, eax
push edi
push 0x76f
push esi
call fcn.0101c3d2
cmp edi, ebx
jl 0x100a65e
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x100a635
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea ecx, [ebp - 0x320]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x318]
call edi
jmp 0x100a664
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [0x10497e0]
or eax, dword [0x10497e4]
je 0x100a6da
push 0x10497e0
call fcn.0100e060
push eax
push 0x1001870
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.0100a18a
add esp, 0x14
push ebx
push eax
push 0x779
push esi
mov dword [ebp - 0x314], eax
call fcn.0101c3d2
cmp dword [ebp - 0x314], ebx
jl 0x100a6da
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x100a6b9
push ebx
lea ecx, [ebp - 0x320]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x318]
call edi
push dword [0x1043028]
lea eax, [ebp - 0x108]
push 0x1001848
push 0x104
push eax
call fcn.0100a18a
add esp, 0x10
push ebx
push eax
push 0x782
push esi
mov dword [ebp - 0x314], eax
call fcn.0101c3d2
cmp dword [ebp - 0x314], ebx
jl 0x100a73e
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x100a71d
push ebx
lea ecx, [ebp - 0x320]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x318]
call edi
push dword [0x104302c]
lea eax, [ebp - 0x108]
push 0x1001824
push 0x104
push eax
call fcn.0100a18a
add esp, 0x10
push ebx
push eax
push 0x78a
push esi
mov dword [ebp - 0x314], eax
call fcn.0101c3d2
cmp dword [ebp - 0x314], ebx
jl 0x100a7a2
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x100a781
push ebx
lea ecx, [ebp - 0x320]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x318]
call edi
push dword [0x1043030]
lea eax, [ebp - 0x108]
push 0x1001800
push 0x104
push eax
call fcn.0100a18a
add esp, 0x10
push ebx
mov edi, eax
push edi
push 0x792
push esi
call fcn.0101c3d2
cmp edi, ebx
jl 0x100a802
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x100a7dd
push ebx
lea ecx, [ebp - 0x320]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x318]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x314], ebx
cmp edi, ebx
mov dword [ebp - 0x31c], ebx
jl 0x100a8b4
lea eax, [ebp - 0x31c]
push eax
push dword [ebp - 0x314]
call fcn.0101c467
push ebx
mov edi, eax
push edi
push 0x7a0
push esi
call fcn.0101c3d2
cmp edi, ebx
jl 0x100a8b4
mov eax, dword [ebp - 0x314]
cmp byte [eax + 0x1049794], bl
mov eax, 0x10017f8
jne 0x100a853
mov eax, 0x10017f0
push eax
push dword [ebp - 0x31c]
lea eax, [ebp - 0x108]
push 0x10017dc
push 0x104
push eax
call fcn.0100a18a
add esp, 0x14
push ebx
mov edi, eax
push edi
push 0x7a6
push esi
call fcn.0101c3d2
cmp edi, ebx
jl 0x100a8b4
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x100a88f
push ebx
lea ecx, [ebp - 0x320]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x318]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc dword [ebp - 0x314]
cmp dword [ebp - 0x314], 3
jb 0x100a808
mov dword [ebp - 0x314], ebx
cmp edi, ebx
mov dword [ebp - 0x31c], ebx
jl 0x100a979
lea eax, [ebp - 0x31c]
push eax
push dword [ebp - 0x314]
call fcn.0101c410
push ebx
mov edi, eax
push edi
push 0x7b6
push esi
call fcn.0101c3d2
cmp edi, ebx
jl 0x100a979
mov eax, dword [ebp - 0x314]
cmp byte [eax + 0x1049798], bl
mov eax, 0x10017f8
jne 0x100a918
mov eax, 0x10017f0
push eax
push dword [ebp - 0x31c]
lea eax, [ebp - 0x108]
push 0x10017cc
push 0x104
push eax
call fcn.0100a18a
add esp, 0x14
push ebx
mov edi, eax
push edi
push 0x7bc
push esi
call fcn.0101c3d2
cmp edi, ebx
jl 0x100a979
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x100a954
push ebx
lea ecx, [ebp - 0x320]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x318]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc dword [ebp - 0x314]
cmp dword [ebp - 0x314], 3
jb 0x100a8cd
mov dword [ebp - 0x314], ebx
cmp edi, ebx
mov dword [ebp - 0x31c], ebx
jl 0x100aa32
lea eax, [ebp - 0x31c]
push eax
push dword [ebp - 0x314]
call fcn.0101c4be
push ebx
mov edi, eax
push edi
push 0x7cc
push esi
call fcn.0101c3d2
cmp edi, ebx
jl 0x100aa32
mov eax, dword [ebp - 0x314]
push dword [eax*4 + 0x1049788]
lea eax, [ebp - 0x108]
push dword [ebp - 0x31c]
push 0x10017bc
push 0x104
push eax
call fcn.0100a18a
add esp, 0x14
push ebx
mov edi, eax
push edi
push 0x7d2
push esi
call fcn.0101c3d2
cmp edi, ebx
jl 0x100aa32
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x100aa0d
push ebx
lea ecx, [ebp - 0x320]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x318]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc dword [ebp - 0x314]
cmp dword [ebp - 0x314], 3
jl 0x100a992
push dword [ebp - 0x318]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0100d61a
leave
ret