Function at 0x403190
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
push ebx
push esi
lea esi, [eax + 0x810]
add eax, 0x830
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push eax
push 0x20
push 1
push esi
call fcn.0041b2f9
add esp, 0x10
cmp eax, 0x20
je 0x4031e0
push str.ERROR__Couldnt_properly_read_out_FFUSecurityHeader_n
push 0xb74
push str.ParseFFUHeaders
push 2
call fcn.004016a0
add esp, 0x10
push 1
call fcn.00401c50
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x18]
shl eax, 0xa
lea esi, [ecx + edx + 0x20]
cdq
push edx
mov ebx, eax
push ebx
xor edi, edi
push edi
push esi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x14], edx
call fcn.0042a3d0
mov ecx, eax
or ecx, edx
je 0x403218
sub ebx, eax
mov eax, dword [ebp - 0x14]
sbb eax, edx
add esi, ebx
adc edi, eax
mov ebx, dword [ebp + 0xc]
push 0
push edi
push esi
push ebx
call fcn.0041aa2a
push ebx
mov ebx, dword [ebp - 4]
push 0x18
push 1
push ebx
call fcn.0041b2f9
add esp, 0x20
cmp eax, 0x18
je 0x403247
push str.ERROR__Couldnt_properly_read_out_FFUImageHeader_n
push 0xb85
jmp 0x4031ca
mov edx, dword [ebx + 0x10]
mov ebx, dword [ebp - 0x10]
xor eax, eax
add edx, 0x18
adc eax, eax
add esi, edx
adc edi, eax
mov eax, dword [ebp - 0xc]
push eax
push ebx
push edi
push esi
mov dword [ebp - 0x14], eax
call fcn.0042a3d0
mov ecx, eax
or ecx, edx
je 0x403278
sub ebx, eax
mov eax, dword [ebp - 0x14]
sbb eax, edx
add esi, ebx
adc edi, eax
mov ebx, dword [ebp + 0xc]
push 0
push edi
push esi
push ebx
call fcn.0041aa2a
push ebx
mov ebx, dword [ebp + 8]
push 0xf8
push 1
add ebx, 0x848
push ebx
call fcn.0041b2f9
add esp, 0x20
cmp eax, 0xf8
je 0x4032b5
push str.ERROR__Couldnt_properly_read_out_FFUStoreHeader_n
push 0xb90
jmp 0x4031ca
add esi, 0xf8
adc edi, 0
mov eax, esi
and eax, 0xf
xor ecx, ecx
mov edx, eax
or edx, ecx
je 0x4032da
mov edx, 0x10
sub edx, eax
mov eax, ecx
sbb eax, ecx
add esi, edx
adc edi, eax
mov eax, dword [ebx + 0xdc]
test eax, eax
je 0x4032f6
push eax
call fcn.0041a5e2
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [ecx + 0x940], eax
mov eax, dword [ebx + 0xd4]
test eax, eax
je 0x403312
push eax
call fcn.0041a5e2
mov edx, dword [ebp + 8]
add esp, 4
mov dword [edx + 0x944], eax
mov ecx, dword [ebx + 0xdc]
cmp ecx, 0xf4240
jae 0x403436
mov eax, dword [ebx + 0xd4]
cmp eax, 0xf4240
jae 0x403436
cmp dword [ebx + 0xd0], 0x10000000
jae 0x403436
test ecx, ecx
je 0x403355
mov edx, dword [ebp + 8]
cmp dword [edx + 0x940], 0
je 0x403365
test eax, eax
je 0x403374
mov eax, dword [ebp + 8]
cmp dword [eax + 0x944], 0
jne 0x403374
push str.ERROR__Failed_to_allocate_space_for_validation_entries_or_blockdataentries_n
push 0xba3
jmp 0x4031ca
test ecx, ecx
je 0x4033c2
mov ecx, dword [ebp + 0xc]
push 0
push edi
push esi
push ecx
call fcn.0041aa2a
mov edx, dword [ebx + 0xdc]
mov eax, dword [ebp + 0xc]
push eax
push edx
mov dword [ebp - 4], edx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x940]
push 1
push eax
call fcn.0041b2f9
mov ecx, dword [ebp - 4]
add esp, 0x20
cmp eax, ecx
je 0x4033bd
push str.ERROR__Failed_to_read_validation_entries_n
push 0xbad
jmp 0x4031ca
add esi, ecx
adc edi, 0
cmp dword [ebx + 0xd4], 0
jbe 0x403415
mov ecx, dword [ebp + 0xc]
push 0
push edi
push esi
push ecx
call fcn.0041aa2a
mov edx, dword [ebx + 0xd4]
mov eax, dword [ebp + 0xc]
push eax
push edx
mov dword [ebp - 4], edx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x944]
push 1
push eax
call fcn.0041b2f9
mov ecx, dword [ebp - 4]
add esp, 0x20
cmp eax, ecx
je 0x403410
push str.ERROR__Failed_to_read_block_data_entries_n
push 0xbb9
jmp 0x4031ca
add esi, ecx
adc edi, 0
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
push edi
push esi
push ecx
push edx
call fcn.00403090
mov ecx, dword [ebp + 8]
add esp, 0x10
mov dword [ecx + 0x948], eax
mov dword [ecx + 0x94c], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret