Function at 0x416720
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
mov ebx, edx
movzx esi, word [ebp + 0xc]
mov eax, esi
and eax, 0xf000
cmp eax, 0x4000
jne 0x4167e1
push ebx
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__mkdir]
add esp, 4
test eax, eax
je 0x4168ca
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 0x416872
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 0x416872
lea edx, [esp + 0x20]
mov ecx, ebx
call fcn.004169f0
movzx eax, word [esp + 0x26]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x4000
jne 0x416872
and eax, 0x1ff
and esi, 0x1ff
cmp eax, esi
je 0x4168ca
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 0x416872
jmp 0x4168ca
mov edi, ecx
push 0x51d73e
mov dword [esp + 8], ebx
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
add esp, 8
test eax, eax
je 0x416872
mov ebx, eax
mov dword [esp + 0xc], edi
push dword [ebp + 8]
call fcn.004303f0
add esp, 4
test eax, eax
je 0x41687c
mov edi, eax
mov eax, dword [ebp + 8]
push eax
call fcn.00430520
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 dword [esp + 8], eax
push dword [ebp + 8]
call fcn.00430520
add esp, 4
mov edi, eax
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov edx, dword [esp + 0xc]
mov ecx, edi
add esp, 4
cmp word [ebp + 0xc], 0
je 0x41685d
mov edi, ecx
sar edi, 0x1f
mov eax, ecx
xor eax, edx
or eax, edi
je 0x416893
mov edi, ecx
sar edi, 0x1f
xor edx, ecx
or edx, edi
mov ebx, 2
je 0x4168b8
jmp 0x416999
mov ebx, 1
jmp 0x416999
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
xor ecx, ecx
mov edi, 0
cmp word [ebp + 0xc], 0
je 0x4168b8
and esi, 0x1ff
push esi
push dword [esp + 8]
mov esi, ecx
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__chmod]
mov ecx, esi
add esp, 8
mov ebx, 2
test eax, eax
jne 0x416999
push edi
push ecx
push dword [esp + 0x14]
call fcn.00430fa0
add esp, 0xc
mov ebx, dword [esp + 4]
cmp dword [ebp + 0x14], 0
js 0x416997
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x14], 0xffffffff
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x20], xmm0
lea esi, [esp + 0x20]
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 + 0x1c], edx
mov dword [esp + 0x18], eax
push ebx
call fcn.00428f90
add esp, 4
mov ebx, 1
test eax, eax
je 0x416999
mov edi, eax
sub esp, 0x1c
movdqa xmm0, xmmword [0x51c660]
movdqu xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x2000000
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
push edi
call fcn.00424f10
add esp, 4
cmp esi, 0xffffffff
je 0x416999
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 0x416999
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret