Function at 0x403570
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x429054]
push esi
mov esi, dword [0x429040]
push eax
mov dword [ebp - 8], esi
call fcn.00402540
add esp, 4
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0
cmp eax, 0xffffffff
jne 0x4035bd
push str.Could_not_get_file_info.
push 0x4dd
push str.start_image_transfer_64bit
push 0
call fcn.00401d50
add esp, 0x10
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x1c]
push ebx
mov ebx, dword [esi + 0x14]
push edi
mov edi, dword [esi + 0x10]
mov esi, dword [esi + 0x18]
push ebx
push edi
push str.start_image_transfer_64bit:_Offset__ld
push 0x4e7
push str.start_image_transfer_64bit
push 1
mov dword [ebp - 8], edx
call fcn.00401d50
push ebx
push edi
push str.start_image_transfer_64bit:_Offset_0x_X
push 0x4e8
push str.start_image_transfer_64bit
push 1
call fcn.00401d50
mov eax, dword [ebp - 8]
push eax
push esi
push str.start_image_transfer_64bit:_Length__ld
push 0x4e9
push str.start_image_transfer_64bit
push 1
call fcn.00401d50
mov ecx, dword [ebp - 8]
add esp, 0x48
push ecx
push esi
push str.start_image_transfer_64bit:_Length_0x_X
push 0x4ea
push str.start_image_transfer_64bit
push 1
call fcn.00401d50
add esp, 0x18
test esi, esi
jne 0x40364a
cmp dword [ebp - 8], esi
je 0x403771
cmp dword [ebp - 0x10], 1
jne 0x403680
mov edx, dword [0x429054]
push edx
call fcn.00402160
mov ecx, dword [ebp - 8]
add esp, 4
mov edx, esi
add edx, edi
adc ecx, ebx
mov dword [ebp - 0x14], eax
xor eax, eax
cmp ecx, eax
ja 0x403771
jb 0x403680
cmp edx, dword [ebp - 0x14]
ja 0x403771
mov eax, dword [0x429054]
push 0
push edi
push eax
call fcn.00407ca3
add esp, 0xc
test esi, esi
je 0x4036e5
mov ebx, dword [ebp - 4]
mov eax, esi
sub eax, ebx
mov edi, eax
cmp eax, 0x100000
jb 0x4036aa
mov edi, 0x100000
mov ecx, dword [0x429044]
mov edx, dword [0x429054]
push edi
push ecx
push edx
call fcn.0040e807
add esp, 0xc
test eax, eax
js 0x4036f7
cmp eax, edi
jne 0x403727
mov eax, dword [0x429044]
push edi
push eax
call fcn.004011a0
add esp, 8
test eax, eax
je 0x40374f
add ebx, edi
mov dword [ebp - 4], ebx
cmp ebx, esi
jb 0x403695
add dword [0x429050], esi
pop edi
pop ebx
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
call fcn.00406805
mov ecx, dword [eax]
push ecx
call fcn.00406706
push eax
push str.file_read_failed:__s
push 0x4fe
push str.start_image_transfer_64bit
push 0
call fcn.00401d50
add esp, 0x18
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 8]
push edx
push esi
push eax
push str.Read__d_bytes__but_was_asked_for__ld_bytes
push 0x502
push str.start_image_transfer_64bit
push 0
call fcn.00401d50
add esp, 0x1c
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push str.Tx_Sahara_Image_Failed
push 0x508
push str.start_image_transfer_64bit
push 0
call fcn.00401d50
add esp, 0x10
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
push eax
push esi
push str.Invalid_length__ld_bytes_request_to_be_transmitted
push 0x4f1
push str.start_image_transfer_64bit
push 0
call fcn.00401d50
mov ecx, dword [0x429054]
push ecx
call fcn.00402160
push eax
push ebx
push edi
push str.File_offset__ld__file_size__d
push 0x4f2
push str.start_image_transfer_64bit
push 0
call fcn.00401d50
add esp, 0x38
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret