Function at 0x100404c0
Capabilities:
Create directory
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x240c
call fcn.10045420
mov eax, dword [0x10084adc]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
push 0x3ff
xor edi, edi
lea eax, [ebp - 0x603]
push edi
push eax
mov byte [ebp - 0x604], 0
call fcn.10045030
add esp, 0xc
cmp byte [0x101580eb], 0
je 0x10040539
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x604]
push eax
call fcn.100480cb
add esp, 0xc
cmp dword [ebp + 8], 2
mov eax, 0x2000
jne 0x10040525
mov eax, 0x1000
push eax
lea eax, [ebp - 0x604]
push eax
call fcn.1000d648
pop ecx
pop ecx
jmp 0x100407a2
mov eax, dword [ebp + 8]
test dword [0x102dddb0], eax
jne 0x100407a2
or dword [0x102dddb0], eax
push esi
push 0x1ff
lea eax, [ebp - 0x203]
push edi
push eax
mov byte [ebp - 0x204], 0
call fcn.10045030
mov esi, 0x9ff
push esi
lea eax, [ebp - 0x2403]
push edi
push eax
mov byte [ebp - 0x2404], 0
call fcn.10045030
push esi
lea eax, [ebp - 0x1003]
push edi
push eax
mov byte [ebp - 0x1004], 0
call fcn.10045030
push esi
lea eax, [ebp - 0x1a03]
push edi
push eax
mov byte [ebp - 0x1a04], 0
call fcn.10045030
push 0x10154e28
lea eax, [ebp - 0x204]
push str._sLog
push eax
call fcn.10045378
lea eax, [ebp - 0x204]
push edi
push eax
call fcn.100484ec
add esp, 0x44
test eax, eax
je 0x100405e4
push edi
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x240c]
push ebx
push eax
call fcn.100457db
lea eax, [ebp - 0x240c]
push eax
call fcn.100457b4
mov ebx, eax
mov eax, dword [ebx + 0x10]
inc eax
push eax
mov eax, dword [ebx + 0x14]
add eax, 0x76c
push eax
lea eax, [ebp - 0x604]
push str._04d__02d_AT.txt
push eax
call fcn.10045378
lea eax, [ebp - 0x604]
add esp, 0x18
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10040629
lea edi, [ebp - 0x204]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10040639
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x204]
and ecx, 3
push 0
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.100484ec
pop ecx
test eax, eax
pop ecx
lea eax, [ebp - 0x204]
jne 0x10040672
push 0x10071108
jmp 0x10040677
push 0x10071104
push eax
call fcn.10047d67
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x100407a0
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x604]
push eax
call fcn.100480cb
mov eax, dword [0x10185a54]
lea ecx, [ebp - 0x1a04]
push ecx
lea ecx, [ebp - 0x1004]
push ecx
lea ecx, [ebp - 0x204]
push ecx
push eax
call fcn.10040465
lea ecx, [ebp - 0x1a04]
push ecx
lea ecx, [ebp - 0x1004]
push ecx
lea ecx, [ebp - 0x204]
push ecx
push eax
call fcn.10040465
lea ecx, [ebp - 0x1a04]
push ecx
lea ecx, [ebp - 0x1004]
push ecx
lea ecx, [ebp - 0x204]
push ecx
push eax
call fcn.10040465
lea ecx, [ebp - 0x1a04]
push ecx
lea ecx, [ebp - 0x1004]
push ecx
lea ecx, [ebp - 0x204]
push ecx
push eax
call fcn.10040465
add esp, 0x4c
lea ecx, [ebp - 0x1a04]
push ecx
lea ecx, [ebp - 0x1004]
push ecx
lea ecx, [ebp - 0x204]
push ecx
push eax
call fcn.10040465
lea eax, [ebp - 0x604]
push eax
push 0x10155228
lea eax, [ebp - 0x1004]
push eax
push dword [ebx]
lea eax, [ebp - 0x2404]
push dword [ebx + 4]
push dword [ebx + 8]
push dword [ebx + 0xc]
push 0x100710e0
push eax
call fcn.10045378
lea eax, [ebp - 0x2404]
add esp, 0x34
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10040766
push esi
sub eax, ecx
push 1
push eax
lea eax, [ebp - 0x2404]
push eax
call fcn.10047c21
push esi
call fcn.10047a43
add esp, 0x14
cmp byte [0x101580eb], 0
je 0x100407a0
push 2
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.1004501f
leave
ret