Function at 0x140001310
Capabilities:
Create directory
Delete file
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x13f0]
mov eax, 0x14f0
call fcn.140002f90
sub rsp, rax
mov rax, qword [0x140006008]
xor rax, rsp
mov qword [rbp + 0x13e0], rax
xor r15d, r15d
mov qword [rsp + 0x60], rcx
mov dword [rsp + 0x30], r15d
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
mov r13d, 0xffffffff
mov r14d, r15d
test rcx, rcx
je 0x140001395
lea r8, [rsp + 0x48]
mov qword [rsp + 0x48], r15
call qword [sym.imp.imobiledevice.dll_afc_read_directory]
test eax, eax
je 0x14000139d
lea ecx, [r13 + 3]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rbx
lea rdx, str.ERROR:_Could_not_read_device_directory__s_n
mov rcx, rax
call fcn.140001010
mov eax, r13d
jmp 0x14000194e
lea rcx, [rbp + 0x1e0]
sub rcx, rbx
nop word [rax + rax]
movzx eax, byte [rbx]
mov byte [rcx + rbx], al
lea rbx, [rbx + 1]
test al, al
jne 0x1400013b0
lea rax, [rbp + 0x1e0]
mov rcx, 0xffffffffffffffff
nop dword [rax]
cmp byte [rax + rcx + 1], r14b
lea rcx, [rcx + 1]
jne 0x1400013d0
cmp byte [rbp + rcx + 0x1df], 0x2f
movzx eax, word [0x140004420]
je 0x140001403
lea rcx, [rbp + 0x1e0]
dec rcx
cmp byte [rcx + 1], r14b
lea rcx, [rcx + 1]
jne 0x1400013f6
mov word [rcx], ax
lea rcx, [rbp + 0x1e0]
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rcx + r8], r14b
jne 0x140001411
lea rdx, [rbp - 0x20]
mov qword [rsp + 0x40], r8
sub rdx, rdi
nop word [rax + rax]
movzx ecx, byte [rdi]
mov byte [rdx + rdi], cl
lea rdi, [rdi + 1]
test cl, cl
jne 0x140001430
lea rdx, [rbp - 0x20]
mov rcx, 0xffffffffffffffff
nop dword [rax]
cmp byte [rdx + rcx + 1], r14b
lea rcx, [rcx + 1]
jne 0x140001450
cmp byte [rbp + rcx - 0x21], 0x2f
je 0x14000147d
lea rcx, [rbp - 0x20]
dec rcx
nop dword [rax]
cmp byte [rcx + 1], r14b
lea rcx, [rcx + 1]
jne 0x140001470
mov word [rcx], ax
lea rax, [rbp - 0x20]
mov rdi, 0xffffffffffffffff
nop dword [rax + rax]
inc rdi
cmp byte [rax + rdi], r14b
jne 0x140001490
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x1540], r12
mov qword [rsp + 0x38], rdi
cmp qword [rax], r14
je 0x140001931
mov qword [rsp + 0x70], r15
mov rbx, r15
nop dword [rax]
mov rcx, qword [rsp + 0x48]
mov rax, qword [rcx + rbx]
cmp byte [rax], 0x2e
jne 0x1400014ed
cmp byte [rax + 1], r15b
je 0x14000190d
cmp byte [rax], 0x2e
jne 0x1400014ed
cmp byte [rax + 1], 0x2e
jne 0x1400014ed
cmp byte [rax + 2], r15b
je 0x14000190d
movsxd rax, r8d
xorps xmm0, xmm0
lea r8, [rbp + 0x1e0]
mov qword [rsp + 0x50], r15
mov rdx, qword [rcx + rbx]
add r8, rax
movups xmmword [rsp + 0x78], xmm0
movups xmmword [rbp - 0x78], xmm0
nop
movzx eax, byte [rdx]
lea rdx, [rdx + 1]
mov byte [r8], al
lea r8, [r8 + 1]
test al, al
jne 0x140001510
mov rcx, qword [rcx + rbx]
mov edx, 0x2e
call qword [sym.imp.VCRUNTIME140.dll_strrchr]
test rax, rax
je 0x140001599
mov r8d, 7
lea rdx, str..synced
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140001599
mov rax, qword [rsp + 0x48]
mov rdx, qword [rbx + rax]
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rdx + rbx], r15b
jne 0x140001560
movsxd rax, edi
lea rcx, [rbp - 0x20]
sub ebx, 7
add rcx, rax
movsxd r8, ebx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
lea eax, [rbx + rdi]
movsxd rcx, eax
cmp rcx, 0x200
jae 0x140001b55
mov byte [rbp + rcx - 0x20], r15b
jmp 0x1400015c1
mov rax, qword [rsp + 0x48]
lea rdx, [rbp - 0x20]
mov rcx, qword [rbx + rax]
movsxd rax, edi
add rdx, rax
nop dword [rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x1400015b0
lea r8, [rsp + 0x50]
mov rcx, rsi
lea rdx, [rbp + 0x1e0]
call qword [sym.imp.imobiledevice.dll_afc_get_file_info]
mov rdi, qword [rsp + 0x50]
test rdi, rdi
jne 0x1400015f8
lea rdx, [rbp + 0x1e0]
lea rcx, str.Failed_to_read_information_for__s._Skipping..._n
call fcn.140001060
jmp 0x140001903
mov r12, r15
movzx esi, word [rsp + 0x7e]
cmp qword [rdi], r15
je 0x14000189d
mov ecx, dword [rbp - 0x74]
mov rax, r15
mov qword [rsp + 0x68], rcx
mov r14d, 8
nop word [rax + rax]
mov rbx, qword [rax + rdi]
lea rcx, str.st_size
mov rdx, r15
nop
movzx eax, byte [rbx + rdx]
inc rdx
cmp al, byte [rcx + rdx - 1]
jne 0x140001657
cmp rdx, 8
jne 0x140001630
mov rcx, qword [r14 + rdi]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoll]
mov qword [rsp + 0x68], rax
jmp 0x140001877
mov rcx, r15
lea rdx, str.st_ifmt
movzx eax, byte [rbx + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1400017bf
cmp rcx, 8
jne 0x140001661
mov r8, qword [r14 + rdi]
lea rdx, str.S_IFREG
mov rcx, r15
nop word [rax + rax]
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1400016ae
cmp rcx, 8
jne 0x140001690
mov esi, 0x8000
jmp 0x14000187c
mov rcx, r15
lea rdx, str.S_IFDIR
nop dword [rax + rax]
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1400016de
cmp rcx, 8
jne 0x1400016c0
mov esi, 0x4000
jmp 0x14000187c
mov rcx, r15
lea rdx, str.S_IFLNK
nop dword [rax + rax]
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x14000170e
cmp rcx, 8
jne 0x1400016f0
mov esi, 0x8000
jmp 0x14000187c
mov rcx, r15
lea rdx, str.S_IFBLK
nop dword [rax + rax]
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x14000173e
cmp rcx, 8
jne 0x140001720
mov esi, 0x3000
jmp 0x14000187c
mov rcx, r15
lea rdx, str.S_IFCHR
nop dword [rax + rax]
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x14000176e
cmp rcx, 8
jne 0x140001750
mov esi, 0x2000
jmp 0x14000187c
mov rax, r15
lea rdx, str.S_IFIFO
nop dword [rax + rax]
movzx ecx, byte [r8 + rax]
inc rax
cmp cl, byte [rdx + rax - 1]
jne 0x14000179e
cmp rax, 8
jne 0x140001780
mov esi, 0x1000
jmp 0x14000187c
lea rdx, str.S_IFSOCK
mov rcx, r8
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x14000187c
mov esi, 0x8000
jmp 0x14000187c
lea rdx, str.st_nlink
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x1400017e1
mov rcx, qword [r14 + rdi]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
jmp 0x140001877
lea rdx, str.st_mtime
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x140001800
mov rcx, qword [r14 + rdi]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoll]
jmp 0x140001877
lea rdx, str.LinkTarget
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x14000187c
mov rcx, qword [0x140006620]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], r15b
jne 0x140001821
lea rdx, [rbp - 0x20]
add rdx, rax
lea rcx, str.Link:__s_n
call fcn.140001060
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x20]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
test eax, eax
jne 0x140001859
lea rcx, [rbp - 0x20]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
cmp dword [0x14000662c], r15d
jne 0x140001874
mov rcx, qword [rsp + 0x60]
lea rdx, [rbp + 0x1e0]
call qword [sym.imp.imobiledevice.dll_afc_remove_path]
mov r13d, r15d
mov rdi, qword [rsp + 0x50]
add r12, 2
add r14, 0x10
lea rax, [r12*8]
cmp qword [rax + rdi], r15
jne 0x140001620
mov r14, qword [rsp + 0x68]
jmp 0x1400018a1
mov r14d, dword [rbp - 0x74]
mov rcx, rdi
call qword [sym.imp.imobiledevice.dll_afc_dictionary_free]
mov eax, 0xf000
and si, ax
mov eax, 0x4000
cmp si, ax
jne 0x14000196f
lea rcx, [rbp - 0x20]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__mkdir]
mov rsi, qword [rsp + 0x60]
lea r8, [rbp - 0x20]
mov rcx, rsi
lea rdx, [rbp + 0x1e0]
call fcn.140001310
cmp dword [0x14000662c], r15d
mov r13d, eax
jne 0x1400018fe
lea rdx, [rbp + 0x1e0]
mov rcx, rsi
call qword [sym.imp.imobiledevice.dll_afc_remove_path]
mov r14d, dword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
mov r8, qword [rsp + 0x40]
mov rax, qword [rsp + 0x70]
inc rax
mov qword [rsp + 0x70], rax
lea rbx, [rax*8]
mov rax, qword [rsp + 0x48]
cmp qword [rbx + rax], r15
jne 0x1400014c0
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.imobiledevice.dll_afc_dictionary_free]
mov r12, qword [rsp + 0x1540]
test r14d, r14d
cmovne r15d, r13d
mov eax, r15d
mov rcx, qword [rbp + 0x13e0]
xor rcx, rsp
call fcn.140002170
add rsp, 0x14f0
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov eax, 0x8000
cmp si, ax
mov rsi, qword [rsp + 0x60]
jne 0x1400018fe
lea r9, [rsp + 0x58]
mov r8d, 1
lea rdx, [rbp + 0x1e0]
mov rcx, rsi
call qword [sym.imp.imobiledevice.dll_afc_file_open]
mov ebx, eax
test eax, eax
je 0x1400019d1
cmp eax, 8
je 0x1400018fe
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, ebx
lea r8, [rbp + 0x1e0]
mov rcx, rax
lea rdx, str.Unable_to_open_device_file__s___d_._Skipping..._n
call fcn.140001010
jmp 0x1400018fe
lea rdx, [0x1400043b4]
lea rcx, [rbp - 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, rax
test rax, rax
jne 0x140001a19
lea ecx, [rax + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea r8, [rbp - 0x20]
lea rdx, str.Unable_to_open_local_file__s._Skipping..._n
call fcn.140001010
mov rdx, qword [rsp + 0x58]
mov rcx, rsi
call qword [sym.imp.imobiledevice.dll_afc_file_close]
jmp 0x1400018fe
mov rcx, qword [0x140006620]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], r15b
jne 0x140001a27
lea r8, [rbp - 0x20]
add r8, rax
lea rdx, str.Move
cmp dword [0x14000662c], r15d
lea rax, str.Copy
lea rcx, str._s:__s_n
cmovne rdx, rax
call fcn.140001060
mov rdx, qword [rsp + 0x58]
lea rax, [rsp + 0x34]
mov r12d, 0x1000
mov qword [rsp + 0x20], rax
mov r9d, r12d
mov dword [rsp + 0x34], r15d
lea r8, [rbp + 0x3e0]
mov rcx, rsi
mov ebx, r15d
call qword [sym.imp.imobiledevice.dll_afc_file_read]
test eax, eax
jne 0x140001ada
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x140001ada
mov r8d, eax
lea rcx, [rbp + 0x3e0]
mov r9, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rdx, qword [rsp + 0x58]
lea rax, [rsp + 0x34]
add ebx, dword [rsp + 0x34]
lea r8, [rbp + 0x3e0]
mov r9d, r12d
mov qword [rsp + 0x20], rax
mov rcx, rsi
call qword [sym.imp.imobiledevice.dll_afc_file_read]
test eax, eax
je 0x140001a90
mov rdx, qword [rsp + 0x58]
mov rcx, rsi
call qword [sym.imp.imobiledevice.dll_afc_file_close]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
cmp r14d, ebx
je 0x140001b15
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.File_size_mismatch._Skipping..._n
call fcn.140001010
jmp 0x1400018fe
cmp dword [0x14000662c], r15d
jne 0x140001b2e
lea rdx, [rbp + 0x1e0]
mov rcx, rsi
call qword [sym.imp.imobiledevice.dll_afc_remove_path]
cmp dword [0x140006628], r15d
je 0x140001b40
lea rcx, [rbp - 0x20]
call fcn.1400010c0
mov r14d, dword [rsp + 0x30]
mov r13d, r15d
inc r14d
mov dword [rsp + 0x30], r14d
jmp 0x140001903
call fcn.14000229c
int3