Function at 0x402a00
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x806c
call fcn.004084e0
mov eax, dword [0x40e004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov dword [ebp - 0x8064], eax
mov ecx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 0x8050], ebx
push edi
mov dword [ebp - 0x805c], ecx
lea edi, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x402a40
push 0
push ecx
push edx
sub esi, edi
mov dword [ebp - 0x8044], 0
call fcn.00401080
mov edi, dword [sym.imp.imobiledevice.dll_mobilebackup2_send_raw]
add esp, 0xc
mov dword [ebp - 0x8060], eax
mov ecx, esi
lea eax, [ebp - 0x8044]
mov dword [ebp - 0x8048], 0
bswap ecx
push eax
push 4
lea eax, [ebp - 0x8054]
mov dword [ebp - 0x806c], 0xffffffff
push eax
push ebx
mov dword [ebp - 0x8054], ecx
call edi
add esp, 0x10
test eax, eax
jne 0x402d29
cmp dword [ebp - 0x8044], 4
jne 0x402d29
lea eax, [ebp - 0x8044]
push eax
push esi
push dword [ebp - 0x805c]
push ebx
call edi
add esp, 0x10
test eax, eax
jne 0x402d29
cmp dword [ebp - 0x8044], esi
jne 0x402d29
mov ebx, dword [ebp - 0x8060]
lea eax, [ebp - 0x8040]
push eax
push ebx
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64]
add esp, 8
test eax, eax
jns 0x402b22
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call esi
cmp dword [eax], 2
je 0x402b1b
call esi
push dword [eax]
push ebx
push str.mb2_handle_send_file
push str._s:_stat_failed_on__s:__d_n
call fcn.004013c0
add esp, 0x10
call esi
jmp 0x402d67
mov ebx, dword [ebp - 0x8024]
mov esi, dword [ebp - 0x8028]
push ebx
push esi
mov dword [ebp - 0x804c], esi
mov dword [ebp - 0x8068], ebx
call fcn.004011a0
add esp, 8
mov edi, eax
cmp dword [0x40e018], 1
jl 0x402b63
push edi
push dword [ebp - 0x805c]
push str.Sending__s___s__n
call fcn.004013c0
add esp, 0xc
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, esi
add esp, 4
or eax, ebx
je 0x402ec1
mov ebx, dword [ebp - 0x8060]
push 0x40934c
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, eax
add esp, 8
mov dword [ebp - 0x8048], edi
test edi, edi
jne 0x402bbc
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call esi
push dword [eax]
push ebx
push str.mb2_handle_send_file
push str._s:_Error_opening_local_file__s:__d_n
call fcn.004013c0
add esp, 0x10
call esi
jmp 0x402d67
mov eax, dword [ebp - 0x8068]
xorps xmm0, xmm0
movlpd qword [ebp - 0x8058], xmm0
mov ebx, dword [ebp - 0x8054]
mov edi, dword [ebp - 0x8058]
nop dword [eax]
mov ecx, esi
sub ecx, edi
sbb eax, ebx
test eax, eax
ja 0x402bfa
jb 0x402bf4
cmp ecx, 0x8000
jae 0x402bfa
mov edx, esi
sub edx, edi
jmp 0x402bff
mov edx, 0x8000
lea eax, [edx + 1]
mov byte [ebp - 0x8004], 0xc
mov ecx, eax
shr eax, 0x10
and ecx, 0xff0000
or ecx, eax
lea eax, [edx + 1]
shl eax, 8
and eax, 0xff0000
shr ecx, 8
or ecx, eax
lea eax, [edx + 1]
shl eax, 0x18
or ecx, eax
lea eax, [ebp - 0x8044]
push eax
push 5
lea eax, [ebp - 0x8008]
mov dword [ebp - 0x8054], ecx
push eax
push dword [ebp - 0x8050]
mov dword [ebp - 0x8008], ecx
call dword [sym.imp.imobiledevice.dll_mobilebackup2_send_raw]
add esp, 0x10
test eax, eax
jne 0x402d13
cmp dword [ebp - 0x8044], 5
jne 0x402d13
push dword [ebp - 0x8048]
lea eax, [ebp - 0x8008]
push 0x8000
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov esi, eax
add esp, 0x10
test esi, esi
je 0x402d4f
lea eax, [ebp - 0x8044]
push eax
push esi
lea eax, [ebp - 0x8008]
push eax
push dword [ebp - 0x8050]
call dword [sym.imp.imobiledevice.dll_mobilebackup2_send_raw]
add esp, 0x10
test eax, eax
jne 0x402d13
mov eax, dword [ebp - 0x8044]
cmp eax, esi
jne 0x402d04
mov eax, dword [ebp - 0x8068]
add edi, esi
mov esi, dword [ebp - 0x804c]
adc ebx, 0
cmp ebx, eax
jb 0x402be0
ja 0x402ce4
cmp edi, esi
jb 0x402be0
push dword [ebp - 0x8048]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call esi
add esp, 4
mov dword [ebp - 0x8048], 0
jmp 0x402ec7
push esi
push eax
push str.Error:_sent_only__d_of__d_bytes_n
call fcn.004013c0
add esp, 0xc
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, dword [ebp - 0x8048]
test eax, eax
je 0x402d29
push eax
call esi
add esp, 4
push dword [ebp - 0x8060]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, dword [ebp - 0x806c]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00407770
mov esp, ebp
pop ebp
ret
push str.mb2_handle_send_file
push str._s:_read_error_n
call fcn.004013c0
add esp, 8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ebx, dword [eax]
test ebx, ebx
je 0x402ec1
mov edi, dword [ebp - 0x8064]
mov esi, dword [sym.imp.plist.dll_plist_new_dict]
cmp dword [edi], 0
jne 0x402d86
call esi
mov dword [edi], eax
push ebx
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov ecx, ebx
add esp, 4
mov edx, eax
mov dword [ebp - 0x804c], edx
sub ecx, 2
je 0x402daf
sub ecx, 0xf
je 0x402da8
neg ebx
jmp 0x402db4
mov ebx, 0xfffffff9
jmp 0x402db4
mov ebx, 0xfffffffa
mov eax, dword [edi]
mov dword [ebp - 0x8064], eax
test eax, eax
je 0x402e14
call esi
push dword [ebp - 0x804c]
mov edi, eax
call dword [sym.imp.plist.dll_plist_new_string]
mov esi, dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 4
push eax
push str.DLFileErrorString
push edi
call esi
add esp, 0xc
mov eax, ebx
cdq
push edx
push eax
call dword [sym.imp.plist.dll_plist_new_uint]
push eax
push str.DLFileErrorCode
push edi
call esi
add esp, 0x14
push edi
push dword [ebp - 0x805c]
push dword [ebp - 0x8064]
call esi
mov edx, dword [ebp - 0x804c]
add esp, 0xc
mov esi, edx
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x402e20
sub esi, ecx
mov byte [ebp - 0x8004], 6
push esi
push edx
lea eax, [esi + 1]
mov ecx, eax
shr eax, 0x10
and ecx, 0xff0000
or ecx, eax
lea eax, [esi + 1]
shl eax, 8
and eax, 0xff0000
shr ecx, 8
or ecx, eax
lea eax, [esi + 1]
shl eax, 0x18
or ecx, eax
lea eax, [ebp - 0x8003]
push eax
mov dword [ebp - 0x8054], ecx
mov dword [ebp - 0x8008], ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x8044]
add esi, 5
push eax
push esi
lea eax, [ebp - 0x8008]
push eax
push dword [ebp - 0x8050]
call dword [sym.imp.imobiledevice.dll_mobilebackup2_send_raw]
add esp, 0x10
test eax, eax
je 0x402ea7
push str.could_not_send_message_n
call fcn.004013c0
add esp, 4
mov eax, dword [ebp - 0x8044]
cmp eax, esi
je 0x402d13
push esi
push eax
push str.could_only_send__d_from__d_n
jmp 0x402d0b
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea eax, [ebp - 0x8044]
mov dword [ebp - 0x806c], 0
push eax
push 5
lea eax, [ebp - 0x8008]
mov dword [ebp - 0x8054], 0x1000000
push eax
push dword [ebp - 0x8050]
mov dword [ebp - 0x8008], 0x1000000
mov byte [ebp - 0x8004], 0
call dword [sym.imp.imobiledevice.dll_mobilebackup2_send_raw]
add esp, 0x10
jmp 0x402d19