Function at 0x40fec0
Capabilities:
Create directory
Timestomp file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x60
movzx esi, word [ebp + 0xc]
mov ebx, edx
mov eax, esi
and eax, 0xf000
cmp eax, 0x4000
jne 0x40ff81
push ebx
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__mkdir]
add esp, 4
test eax, eax
je 0x410066
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x40], xmm0
movdqa xmmword [esp + 0x30], xmm0
movdqa xmmword [esp + 0x20], xmm0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [eax], 0x11
jne 0x410003
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat32i64]
add esp, 8
test eax, eax
jne 0x410003
lea edx, [esp + 0x20]
mov ecx, ebx
call fcn.00410170
movzx eax, word [esp + 0x26]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x4000
jne 0x410003
and eax, 0x1ff
and esi, 0x1ff
cmp eax, esi
je 0x410066
push esi
push ebx
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__chmod]
add esp, 8
test eax, eax
jne 0x410003
jmp 0x410066
mov edi, ecx
push 0x501e2e
mov dword [esp + 0x10], ebx
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
add esp, 8
test eax, eax
je 0x410003
mov ebx, eax
mov dword [esp + 8], edi
push dword [ebp + 8]
call fcn.00425860
add esp, 4
test eax, eax
je 0x41000d
mov edi, eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], 0
push eax
call fcn.004259a0
add esp, 4
push ebx
push eax
push 1
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
mov edi, eax
push dword [ebp + 8]
call fcn.004259a0
add esp, 4
mov ecx, eax
mov dword [esp], edi
xor eax, edi
mov edi, dword [esp + 8]
sar ecx, 0x1f
or eax, ecx
je 0x410020
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
mov ebx, 2
jmp 0x410124
mov ebx, 1
jmp 0x410124
mov edi, dword [esp + 8]
mov dword [esp + 4], 0
mov dword [esp], 0
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
cmp word [ebp + 0xc], 0
je 0x410051
and esi, 0x1ff
push esi
push dword [esp + 0x10]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__chmod]
add esp, 8
mov ebx, 2
test eax, eax
jne 0x410124
push dword [esp + 4]
push dword [esp + 4]
push edi
call fcn.004262f0
add esp, 0xc
mov ebx, dword [esp + 0xc]
cmp dword [ebp + 0x14], 0
js 0x410122
mov edi, dword [ebp + 0x10]
pcmpeqd xmm0, xmm0
lea esi, [esp + 0x20]
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x14], 0xffffffff
movdqa xmmword [esp + 0x20], xmm0
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov ecx, 0x989680
mov eax, edi
imul ecx
add eax, 0xd53e8000
adc edx, 0x19db1de
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
push ebx
call fcn.0041f7a0
add esp, 4
mov ebx, 1
test eax, eax
je 0x410124
mov edi, eax
push 0
push 0x2000000
push 3
push 0
push 0
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
push edi
call fcn.0041c220
add esp, 4
cmp esi, 0xffffffff
je 0x410124
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
test edi, edi
sete bl
jmp 0x410124
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret