Function at 0x401410
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
mov eax, dword [0x405004]
xor eax, esp
mov dword [esp + 0x48], eax
mov ecx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov edx, esi
push edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], 0
call fcn.00401050
mov ebx, eax
test ebx, ebx
jne 0x401527
push 0x2f
push dword [esi]
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
add esp, 8
test eax, eax
je 0x40146a
inc eax
jmp 0x40146c
mov eax, dword [esi]
push eax
push str.Usage:__s__OPTIONS____i_FILE____o_FILE__n
call fcn.00401010
push 0x403184
call fcn.00401010
add esp, 0xc
push str.Convert_a_plist_FILE_from_binary_to_XML_format_or_vice_versa._n
call fcn.00401010
add esp, 4
push 0x403184
call fcn.00401010
add esp, 4
push str.OPTIONS:_n
call fcn.00401010
add esp, 4
push str.___i____infile_FILE_______Optional_FILE_to_convert_from_or_stdin_if___or_not_used_n
call fcn.00401010
add esp, 4
push str.___o____outfile_FILE______Optional_FILE_to_convert_to_or_stdout_if___or_not_used_n
call fcn.00401010
add esp, 4
push str.___f____format__binxml___Force_output_format__regardless_of_input_type_n
call fcn.00401010
add esp, 4
push str.___d____debug_____________Enable_extended_debug_output_n
call fcn.00401010
add esp, 4
push str.___v____version___________Print_version_information_n
call fcn.00401010
add esp, 4
push 0x403184
call fcn.00401010
add esp, 4
push str.Homepage:_____https:__github.com_libimobiledevice_win32_libimobiledevice_vs___n
call fcn.00401010
add esp, 4
push str.Bug_Reports:__https:__github.com_libimobiledevice_win32_libimobiledevice_vs___n
call fcn.00401010
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.0040188b
mov esp, ebp
pop ebp
ret
mov esi, dword [ebx]
test esi, esi
je 0x401869
mov ecx, 0x4034a0
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401558
test dl, dl
je 0x401554
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401558
add eax, 2
add ecx, 2
test dl, dl
jne 0x401538
xor eax, eax
jmp 0x40155d
sbb eax, eax
or eax, 1
test eax, eax
je 0x401869
push 0x4034dc
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov esi, eax
add esp, 8
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x4015be
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push dword [ebx]
push str.ERROR:_Could_not_open_input_file__s:__s_n
call fcn.00401010
add esp, 0xc
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
lea eax, [esi + 1]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.0040188b
mov esp, ebp
pop ebp
ret
push 0x30
lea eax, [esp + 0x24]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
add esp, 4
lea ecx, [esp + 0x20]
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__fstat64i32]
mov eax, dword [esp + 0x3c]
add esp, 8
cmp eax, 8
jge 0x401614
push str.ERROR:_Input_file_is_too_small_to_contain_valid_plist_data._n
call fcn.00401010
add esp, 4
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x401873
inc eax
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov edi, eax
push esi
push dword [esp + 0x38]
push 1
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push dword [esp + 0x2c]
mov esi, eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov al, byte [ebx + 0xa]
add esp, 0x14
test al, al
jne 0x40167d
push esi
push edi
call dword [sym.imp.plist.dll_plist_is_binary]
add esp, 8
test eax, eax
lea eax, [esp + 0x14]
push eax
push esi
push edi
je 0x401697
call dword [sym.imp.plist.dll_plist_from_bin]
add esp, 0xc
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.plist.dll_plist_to_xml]
jmp 0x40170a
cmp al, 1
jne 0x4016b6
push esi
push edi
call dword [sym.imp.plist.dll_plist_is_binary]
add esp, 8
test eax, eax
jne 0x4016ef
lea eax, [esp + 0x14]
push eax
push esi
push edi
call dword [sym.imp.plist.dll_plist_from_xml]
add esp, 0xc
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.plist.dll_plist_to_bin]
jmp 0x40170a
cmp al, 2
jne 0x40170d
push esi
push edi
call dword [sym.imp.plist.dll_plist_is_binary]
add esp, 8
test eax, eax
je 0x4016ef
lea eax, [esp + 0x14]
push eax
push esi
push edi
call dword [sym.imp.plist.dll_plist_from_bin]
add esp, 0xc
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.plist.dll_plist_to_xml]
jmp 0x40170a
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push esi
call eax
add esp, 4
mov dword [esp + 0x10], eax
push esi
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov dword [esp + 0x24], esi
add esp, 0xc
push dword [esp + 0x14]
call dword [sym.imp.plist.dll_plist_free]
add esp, 4
push edi
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call edi
add esp, 4
cmp dword [esp + 0x10], 0
je 0x401842
mov esi, dword [ebx + 4]
test esi, esi
je 0x401800
mov ecx, 0x4034a0
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401763
test dl, dl
je 0x40175f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401763
add eax, 2
add ecx, 2
test dl, dl
jne 0x401743
xor eax, eax
jmp 0x401768
sbb eax, eax
or eax, 1
test eax, eax
je 0x401800
push 0x40354c
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x4017c2
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push dword [ebx + 4]
push str.ERROR:_Could_not_open_output_file__s:__s_n
call fcn.00401010
add esp, 0xc
push ebx
call edi
add esp, 4
lea eax, [esi + 1]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.0040188b
mov esp, ebp
pop ebp
ret
push esi
push 1
push dword [esp + 0x20]
push dword [esp + 0x1c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
push dword [esp + 0x10]
call edi
add esp, 4
push ebx
call edi
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.0040188b
mov esp, ebp
pop ebp
ret
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push 1
push dword [esp + 0x20]
push dword [esp + 0x1c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
push dword [esp + 0x10]
call edi
add esp, 4
push ebx
call edi
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.0040188b
mov esp, ebp
pop ebp
ret
push str.ERROR:_Failed_to_convert_input_file._n
call fcn.00401010
add esp, 4
push ebx
call edi
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.0040188b
mov esp, ebp
pop ebp
ret
push str.ERROR:_reading_from_stdin_is_not_supported_on_Windows
call fcn.00401010
mov ecx, dword [esp + 0x58]
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040188b
mov esp, ebp
pop ebp
ret