Function at 0x4012e0
Capabilities:
Create directory
Delete file
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x149c
call fcn.00403190
mov eax, dword [0x406004]
xor eax, esp
mov dword [esp + 0x1498], eax
push ebx
mov eax, ecx
mov dword [esp + 0x28], 0
push esi
or ebx, 0xffffffff
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ebx
mov esi, edx
push edi
test eax, eax
je 0x401352
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0
push ecx
push esi
push eax
call dword [sym.imp.imobiledevice.dll_afc_read_directory]
add esp, 0xc
test eax, eax
je 0x40136a
push esi
push str.ERROR:_Could_not_read_device_directory__s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401010
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1498]
xor ecx, esp
call fcn.00402410
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x2a0]
sub ecx, esi
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x401373
lea ecx, [esp + 0x2a0]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401390
mov ax, word [0x404228]
sub ecx, edx
cmp byte [esp + ecx + 0x29f], 0x2f
je 0x4013be
lea edi, [esp + 0x2a0]
dec edi
mov cl, byte [edi + 1]
lea edi, [edi + 1]
test cl, cl
jne 0x4013b1
mov word [edi], ax
lea esi, [esp + 0x2a0]
lea edx, [esi + 1]
mov cl, byte [esi]
inc esi
test cl, cl
jne 0x4013c8
sub esi, edx
mov edx, dword [ebp + 8]
mov dword [esp + 0x3c], esi
lea esi, [esp + 0xa0]
sub esi, edx
mov cl, byte [edx]
lea edx, [edx + 1]
mov byte [esi + edx - 1], cl
test cl, cl
jne 0x4013e1
lea edx, [esp + 0xa0]
lea esi, [edx + 1]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x4013f8
sub edx, esi
cmp byte [esp + edx + 0x9f], 0x2f
je 0x401420
lea edi, [esp + 0xa0]
dec edi
mov cl, byte [edi + 1]
lea edi, [edi + 1]
test cl, cl
jne 0x401413
mov word [edi], ax
lea edx, [esp + 0xa0]
lea ecx, [edx + 1]
nop word [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x401430
mov eax, dword [esp + 0x18]
sub edx, ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], 0
cmp dword [eax], 0
je 0x4015e7
xor edi, edi
mov ebx, dword [esp + 0x18]
mov ecx, 0x404224
mov esi, dword [ebx + edi]
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401482
test dl, dl
je 0x40147e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401482
add eax, 2
add ecx, 2
test dl, dl
jne 0x401462
xor eax, eax
jmp 0x401487
sbb eax, eax
or eax, 1
test eax, eax
je 0x4015c5
mov eax, 0x404270
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x4014b4
test cl, cl
je 0x4014b0
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x4014b4
add esi, 2
add eax, 2
test cl, cl
jne 0x401494
xor eax, eax
jmp 0x4014b9
sbb eax, eax
or eax, 1
test eax, eax
je 0x4015c5
push 0x30
lea eax, [esp + 0x44]
mov dword [esp + 0x20], 0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [ebx + edi]
lea edx, [esp + 0x2ac]
add esp, 0xc
add edx, dword [esp + 0x3c]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x4014e8
push 0x2e
push dword [ebx + edi]
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
add esp, 8
test eax, eax
je 0x40156d
push 7
push str..synced
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x40156d
mov eax, dword [esp + 0x18]
mov ecx, dword [edi + eax]
mov esi, ecx
lea edx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x401530
mov ebx, dword [esp + 0x34]
lea eax, [esp + 0xa0]
sub esi, edx
add eax, ebx
add esi, 0xfffffff9
push esi
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
lea eax, [esi + ebx]
add esp, 0xc
cmp eax, 0x200
jae 0x401c1c
mov byte [esp + eax + 0xa0], 0
jmp 0x40158e
mov eax, dword [esp + 0x18]
lea edx, [esp + 0xa0]
add edx, dword [esp + 0x34]
mov ecx, dword [edi + eax]
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x401580
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x2a4]
push eax
push esi
call dword [sym.imp.imobiledevice.dll_afc_get_file_info]
add esp, 0xc
cmp dword [esp + 0x1c], 0
jne 0x401612
lea eax, [esp + 0x2a0]
push eax
push str.Failed_to_read_information_for__s._Skipping..._n
call fcn.00401040
add esp, 8
mov ebx, dword [esp + 0x10]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
inc edx
mov dword [esp + 0x38], edx
lea edi, [edx*4]
cmp dword [edi + eax], 0
jne 0x401454
push dword [esp + 0x18]
call dword [sym.imp.imobiledevice.dll_afc_dictionary_free]
mov ecx, dword [esp + 0x14a8]
add esp, 4
xor eax, eax
cmp dword [esp + 0x30], eax
pop edi
cmovne eax, ebx
pop esi
pop ebx
xor ecx, esp
call fcn.00402410
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x1c]
xor ebx, ebx
cmp dword [eax], ebx
je 0x4019b0
mov eax, dword [esp + 0x54]
xor ecx, ecx
mov dword [esp + 0x24], eax
nop word [eax + eax]
mov edi, dword [esp + 0x1c]
add edi, ecx
mov ecx, str.st_size
mov esi, dword [edi]
mov eax, esi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401660
test dl, dl
je 0x40165c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401660
add eax, 2
add ecx, 2
test dl, dl
jne 0x401640
xor eax, eax
jmp 0x401665
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40167e
push dword [edi + 4]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoll]
add esp, 4
mov dword [esp + 0x24], eax
jmp 0x40198e
mov ecx, str.st_ifmt
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4016a5
test dl, dl
je 0x4016a1
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4016a5
add eax, 2
add ecx, 2
test dl, dl
jne 0x401685
xor eax, eax
jmp 0x4016aa
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40185e
mov esi, dword [edi + 4]
mov ecx, str.S_IFREG
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4016e0
test dl, dl
je 0x4016dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4016e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4016c0
xor eax, eax
jmp 0x4016e5
sbb eax, eax
or eax, 1
test eax, eax
je 0x40184f
mov ecx, str.S_IFDIR
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401714
test dl, dl
je 0x401710
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401714
add eax, 2
add ecx, 2
test dl, dl
jne 0x4016f4
xor eax, eax
jmp 0x401719
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40172c
mov eax, 0x4000
mov word [esp + 0x46], ax
jmp 0x40198e
mov ecx, str.S_IFLNK
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401753
test dl, dl
je 0x40174f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401753
add eax, 2
add ecx, 2
test dl, dl
jne 0x401733
xor eax, eax
jmp 0x401758
sbb eax, eax
or eax, 1
test eax, eax
je 0x40184f
mov ecx, str.S_IFBLK
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401787
test dl, dl
je 0x401783
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401787
add eax, 2
add ecx, 2
test dl, dl
jne 0x401767
xor eax, eax
jmp 0x40178c
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40179f
mov eax, 0x3000
mov word [esp + 0x46], ax
jmp 0x40198e
mov ecx, str.S_IFCHR
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4017c6
test dl, dl
je 0x4017c2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4017c6
add eax, 2
add ecx, 2
test dl, dl
jne 0x4017a6
xor eax, eax
jmp 0x4017cb
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4017de
mov eax, 0x2000
mov word [esp + 0x46], ax
jmp 0x40198e
mov ecx, str.S_IFIFO
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401805
test dl, dl
je 0x401801
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401805
add eax, 2
add ecx, 2
test dl, dl
jne 0x4017e5
xor eax, eax
jmp 0x40180a
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40181d
mov eax, 0x1000
mov word [esp + 0x46], ax
jmp 0x40198e
mov eax, str.S_IFSOCK
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x401842
test cl, cl
je 0x40183e
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x401842
add esi, 2
add eax, 2
test cl, cl
jne 0x401822
xor eax, eax
jmp 0x401847
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40198e
mov eax, 0x8000
mov word [esp + 0x46], ax
jmp 0x40198e
mov ecx, str.st_nlink
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401885
test dl, dl
je 0x401881
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401885
add eax, 2
add ecx, 2
test dl, dl
jne 0x401865
xor eax, eax
jmp 0x40188a
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40189f
push dword [edi + 4]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
jmp 0x40198e
mov ecx, str.st_mtime
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4018c6
test dl, dl
je 0x4018c2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4018c6
add eax, 2
add ecx, 2
test dl, dl
jne 0x4018a6
xor eax, eax
jmp 0x4018cb
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4018e0
push dword [edi + 4]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoll]
add esp, 4
jmp 0x40198e
mov eax, str.LinkTarget
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x401905
test cl, cl
je 0x401901
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x401905
add esi, 2
add eax, 2
test cl, cl
jne 0x4018e5
xor eax, eax
jmp 0x40190a
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40198e
mov eax, dword [0x406380]
lea edx, [eax + 1]
nop word [eax + eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401920
sub eax, edx
lea ecx, [esp + 0xa0]
add eax, ecx
push eax
push str.Link:__s_n
call fcn.00401040
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0xac]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 0x10
test eax, eax
jne 0x401968
lea eax, [esp + 0xa0]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 4
cmp dword [0x406388], 0
jne 0x401986
lea eax, [esp + 0x2a0]
push eax
push dword [esp + 0x18]
call dword [sym.imp.imobiledevice.dll_afc_remove_path]
add esp, 8
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x1c]
add ebx, 2
lea ecx, [ebx*4]
cmp dword [ecx + eax], 0
jne 0x401630
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x14]
jmp 0x4019b8
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x24], ebx
push dword [esp + 0x1c]
call dword [sym.imp.imobiledevice.dll_afc_dictionary_free]
mov eax, dword [esp + 0x4a]
mov ecx, 0x4000
and eax, 0xf000
add esp, 4
cmp ax, cx
jne 0x401a2c
lea eax, [esp + 0xa0]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__mkdir]
add esp, 4
lea eax, [esp + 0xa0]
lea edx, [esp + 0x2a0]
mov ecx, esi
push eax
call fcn.004012e0
add esp, 4
mov ebx, eax
cmp dword [0x406388], 0
mov dword [esp + 0x10], ebx
jne 0x4015c9
lea eax, [esp + 0x2a0]
push eax
push esi
call dword [sym.imp.imobiledevice.dll_afc_remove_path]
add esp, 8
jmp 0x4015c9
mov ecx, 0x8000
cmp ax, cx
jne 0x4015c5
lea eax, [esp + 0x28]
push eax
push 1
lea eax, [esp + 0x2a8]
push eax
push esi
call dword [sym.imp.imobiledevice.dll_afc_file_open]
add esp, 0x10
test eax, eax
je 0x401a87
cmp eax, 8
je 0x4015c5
push eax
lea eax, [esp + 0x2a4]
push eax
push str.Unable_to_open_device_file__s___d_._Skipping..._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401010
add esp, 0x10
jmp 0x4015c5
lea eax, [esp + 0xa0]
push 0x4041c4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
jne 0x401adb
lea eax, [esp + 0xa0]
push eax
push str.Unable_to_open_local_file__s._Skipping..._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401010
add esp, 0xc
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push esi
call dword [sym.imp.imobiledevice.dll_afc_file_close]
add esp, 0xc
jmp 0x4015c5
mov ecx, dword [0x406380]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401ae4
sub ecx, edx
lea eax, [esp + 0xa0]
add eax, ecx
cmp dword [0x406388], 0
push eax
mov ecx, str.Move
mov eax, str.Copy
cmove eax, ecx
push eax
push str._s:__s_n
call fcn.00401040
add esp, 0xc
mov dword [esp + 0x20], 0
lea eax, [esp + 0x20]
xor esi, esi
push eax
push 0x1000
lea eax, [esp + 0x4a8]
push eax
push dword [esp + 0x38]
push dword [esp + 0x38]
push dword [esp + 0x28]
call dword [sym.imp.imobiledevice.dll_afc_file_read]
add esp, 0x18
test eax, eax
jne 0x401b9c
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x401b98
push edi
push eax
lea eax, [esp + 0x4a8]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esi, dword [esp + 0x30]
lea eax, [esp + 0x30]
push eax
push 0x1000
lea eax, [esp + 0x4b8]
push eax
push dword [esp + 0x48]
push dword [esp + 0x48]
push ebx
call dword [sym.imp.imobiledevice.dll_afc_file_read]
add esp, 0x28
test eax, eax
je 0x401b52
mov ebx, dword [esp + 0x24]
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push dword [esp + 0x1c]
call dword [sym.imp.imobiledevice.dll_afc_file_close]
add esp, 0xc
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
cmp ebx, esi
je 0x401bda
push str.File_size_mismatch._Skipping..._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401010
jmp 0x4015c2
cmp dword [0x406388], 0
jne 0x401bf8
lea eax, [esp + 0x2a0]
push eax
push dword [esp + 0x18]
call dword [sym.imp.imobiledevice.dll_afc_remove_path]
add esp, 8
cmp dword [0x406384], 0
je 0x401c0d
lea ecx, [esp + 0xa0]
call fcn.00401080
inc dword [esp + 0x30]
xor ebx, ebx
mov dword [esp + 0x10], ebx
jmp 0x4015c9
call fcn.00402542
int3