Function at 0x48e9ff
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x536260]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x20], 0
xor eax, eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
lea edi, [ebp - 0x18]
mov esi, ecx
stosd dword es:[edi], eax
push 0x50d57c
push ebx
mov dword [ebp - 0x2c], esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.004bfca0
mov dword [esi + 0x834], eax
pop ecx
pop ecx
test eax, eax
je 0x48eda8
push ebx
push 0x50d584
call fcn.0041ba8b
push 2
push 0
push dword [esi + 0x834]
call fcn.004c053c
push dword [esi + 0x834]
call fcn.004c0b72
push 0
push 0
push dword [esi + 0x834]
mov edi, eax
call fcn.004c053c
add esp, 0x24
cmp edi, 0x200000
ja 0x48eda8
push edi
call fcn.004bfa2b
mov dword [esi + 0x838], eax
pop ecx
test eax, eax
jne 0x48eaa8
push str.malloc_mergedFW_buffer_error__n
call fcn.0041ba8b
jmp 0x48eda7
push dword [esi + 0x834]
push edi
push 1
push eax
call fcn.004c00a1
add esp, 0x10
cmp edi, eax
je 0x48eacd
push str.read_FW_error__n
call fcn.0041ba8b
jmp 0x48ed94
mov eax, dword [esi + 0x838]
mov cl, byte [eax]
mov byte [esi + 0x848], cl
mov eax, dword [esi + 0x838]
mov al, byte [eax + 1]
mov byte [esi + 0x849], al
movzx eax, al
push eax
movzx eax, cl
push eax
push str.head_is_0x_x__0x_x_n
call fcn.0041ba8b
add esp, 0xc
cmp byte [esi + 0x848], 0x73
je 0x48eb18
cmp byte [esi + 0x849], 0x73
je 0x48eb18
push str.upg_FW_not_match__n
jmp 0x48eac3
mov eax, dword [esi + 0x838]
push 3
pop edi
mov al, byte [eax + 2]
movzx ebx, al
push ebx
push str.totalFW_d_n
mov dword [ebp - 0x28], ebx
call fcn.0041ba8b
and dword [ebp - 0x1c], 0
pop ecx
pop ecx
test ebx, ebx
je 0x48ebb3
mov eax, dword [esi + 0x838]
mov cl, byte [eax + edi]
mov bh, byte [eax + edi + 1]
mov bl, byte [eax + edi + 2]
mov al, byte [eax + edi + 3]
add edi, 4
mov byte [ebp - 0x22], al
movzx eax, al
push eax
movzx eax, bl
push eax
movzx eax, bh
push eax
movzx eax, cl
push eax
push str.tmp_0_0x_x__tmp_1_0x_x__tmp_2_0x_x__tmp_3_0x_x_n
mov byte [ebp - 0x21], cl
call fcn.0041ba8b
movzx ecx, byte [ebp - 0x21]
shl ecx, 8
movzx eax, bh
or ecx, eax
movzx eax, bl
mov ebx, dword [ebp - 0x1c]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x22]
shl ecx, 8
or ecx, eax
push ecx
push ebx
push str.FWSize__d_0x_x_n
mov dword [ebp + ebx*4 - 0x18], ecx
call fcn.0041ba8b
add esp, 0x20
inc ebx
mov dword [ebp - 0x1c], ebx
cmp ebx, dword [ebp - 0x28]
jb 0x48eb3f
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff2
push eax
mov dword [esi + 0x7fc], eax
mov dword [esi + 0x828], eax
call fcn.004bfa2b
push dword [esi + 0x7fc]
mov dword [esi + 0x83c], eax
push str.MCU_imgfilesize0x_x_n
call fcn.0041ba8b
mov ecx, dword [esi + 0x838]
mov al, byte [ecx + edi]
mov byte [esi + 0x847], al
mov al, byte [ecx + edi + 1]
mov byte [esi + 0x846], al
mov bl, byte [ecx + edi + 2]
mov byte [esi + 0x84c], bl
mov eax, dword [esi + 0x838]
mov dl, byte [edi + eax + 3]
mov byte [esi + 0x84d], dl
mov eax, dword [esi + 0x838]
mov cl, byte [edi + eax + 4]
mov byte [esi + 0x84e], cl
mov eax, dword [esi + 0x838]
mov al, byte [edi + eax + 5]
add edi, 6
mov byte [esi + 0x84f], al
movzx eax, al
push eax
movzx eax, cl
push eax
movzx eax, dl
push eax
movzx eax, bl
push eax
push str.HEAD_0_0x_x__HEAD_1_0x_x__HEAD_2_0x_x__HEAD_3_0x_x_n
call fcn.0041ba8b
movzx eax, byte [esi + 0x84d]
movzx ebx, byte [esi + 0x84e]
push dword [esi + 0x7fc]
add ebx, eax
movzx eax, byte [esi + 0x847]
add ebx, eax
movzx eax, byte [esi + 0x846]
add ebx, eax
movzx eax, byte [esi + 0x84c]
add ebx, eax
movzx eax, byte [esi + 0x84f]
push str.read_MCUFW_size__0x_x_n
add ebx, eax
call fcn.0041ba8b
xor ecx, ecx
add esp, 0x28
cmp dword [esi + 0x7fc], ecx
jbe 0x48ecca
mov edx, dword [esi + 0x83c]
mov eax, dword [esi + 0x838]
mov al, byte [edi + eax]
inc edi
mov byte [edx + ecx], al
mov edx, dword [esi + 0x83c]
movzx eax, byte [edx + ecx]
add ebx, eax
inc ecx
cmp ecx, dword [esi + 0x7fc]
jb 0x48eca8
mov eax, dword [esi + 0x838]
lea esi, [eax + edi]
inc edi
mov dword [ebp - 0x1c], edi
add edi, eax
mov edx, dword [ebp - 0x1c]
inc edx
lea ecx, [eax + edx]
inc edx
add eax, edx
inc edx
mov dword [ebp - 0x1c], edx
movzx edx, byte [eax]
movzx eax, byte [esi]
add edx, eax
movzx eax, byte [ecx]
add edx, eax
movzx eax, byte [edi]
add eax, ebx
add eax, edx
push eax
push str.MCU_cal_encrypt_checksum0x_x__n
mov dword [ebp - 0x28], eax
call fcn.0041ba8b
mov esi, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x1c]
mov eax, dword [esi + 0x838]
mov ch, byte [eax + edi]
mov byte [ebp - 0x20], ch
mov bl, byte [eax + edi + 1]
mov byte [ebp - 0x1f], bl
mov dl, byte [eax + edi + 2]
mov byte [ebp - 0x1e], dl
mov cl, byte [eax + edi + 3]
movzx eax, ch
shl eax, 8
mov dword [ebp - 0x2c], eax
movzx eax, bl
mov ebx, dword [ebp - 0x2c]
or ebx, eax
mov byte [ebp - 0x1d], cl
shl ebx, 8
movzx eax, dl
or ebx, eax
movzx eax, cl
shl ebx, 8
or ebx, eax
push ebx
push str.MCU_encrypt_checksum0x_x__n
call fcn.0041ba8b
mov al, byte [esi + 0xa80]
add esp, 0x10
cmp byte [esi + 0x847], 1
jne 0x48ed77
cmp al, 1
jne 0x48edc8
cmp dword [ebp - 0x28], ebx
je 0x48edd8
push str.MCU_checksum_error__n
call fcn.0041ba8b
pop ecx
push dword [esi + 0x83c]
call fcn.004a45f7
and dword [esi + 0x83c], 0
pop ecx
push dword [esi + 0x838]
call fcn.004a45f7
and dword [esi + 0x838], 0
pop ecx
push dword [esi + 0x834]
call fcn.004bfde9
pop ecx
push 2
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00495b3a
leave
ret 4
mov al, byte [esi + 0x846]
cmp al, byte [esi + 0x845]
jne 0x48ed77
jmp 0x48ed72
push 4
lea eax, [ebp - 0x20]
push 0
push eax
call fcn.00497890
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff2
push eax
mov dword [esi + 0x800], eax
call fcn.004bfa2b
add esp, 0x10
mov dword [esi + 0x840], eax
test eax, eax
jne 0x48ee0e
push str.malloc_DSPFW_fail_n
jmp 0x48ed7c
push dword [esi + 0x800]
push str.dspsize0x_x_n
call fcn.0041ba8b
mov ecx, dword [esi + 0x838]
mov al, byte [ecx + edi + 4]
mov byte [esi + 0x847], al
mov al, byte [ecx + edi + 5]
mov byte [esi + 0x846], al
mov ch, byte [ecx + edi + 6]
mov byte [esi + 0x850], ch
mov eax, dword [esi + 0x838]
mov bl, byte [edi + eax + 7]
mov byte [esi + 0x851], bl
mov eax, dword [esi + 0x838]
mov dl, byte [edi + eax + 8]
mov byte [esi + 0x852], dl
mov eax, dword [esi + 0x838]
mov cl, byte [edi + eax + 9]
add edi, 0xa
movzx eax, ch
mov dword [ebp - 0x1c], eax
movzx eax, dl
add dword [ebp - 0x1c], eax
movzx eax, bl
add dword [ebp - 0x1c], eax
mov byte [esi + 0x853], cl
movzx eax, byte [esi + 0x847]
add dword [ebp - 0x1c], eax
movzx eax, byte [esi + 0x846]
add dword [ebp - 0x1c], eax
movzx eax, cl
add dword [ebp - 0x1c], eax
movzx eax, cl
push eax
movzx eax, dl
push eax
movzx eax, bl
push eax
movzx eax, ch
push eax
push str.HEAD_0_0x_x__HEAD_1_0x_x__HEAD_2_0x_x__HEAD_3_0x_x_n
call fcn.0041ba8b
push dword [esi + 0x800]
push str.read_DSPFW_size__0x_x_n
call fcn.0041ba8b
xor ecx, ecx
add esp, 0x24
cmp dword [esi + 0x800], ecx
jbe 0x48ef06
mov ebx, dword [esi + 0x840]
mov edx, dword [ebp - 0x1c]
mov eax, dword [esi + 0x838]
mov al, byte [edi + eax]
inc edi
mov byte [ebx + ecx], al
mov ebx, dword [esi + 0x840]
movzx eax, byte [ebx + ecx]
add edx, eax
inc ecx
cmp ecx, dword [esi + 0x800]
jb 0x48eee1
mov dword [ebp - 0x1c], edx
mov eax, dword [esi + 0x838]
mov bl, byte [eax + edi]
mov byte [ebp - 0x20], bl
mov dl, byte [eax + edi + 1]
mov byte [ebp - 0x1f], dl
mov cl, byte [eax + edi + 2]
mov byte [ebp - 0x1e], cl
mov al, byte [eax + edi + 3]
mov byte [ebp - 0x1d], al
movzx eax, al
push eax
movzx eax, cl
push eax
movzx eax, dl
push eax
movzx eax, bl
push eax
push str.last_0_0x_x__last_1_0x_x__last_2_0x_x__last_3_0x_x_n
call fcn.0041ba8b
movzx eax, byte [ebp - 0x1e]
movzx ecx, byte [ebp - 0x1d]
add ecx, eax
movzx eax, byte [ebp - 0x1f]
add ecx, eax
movzx eax, byte [ebp - 0x20]
add eax, dword [ebp - 0x1c]
add eax, ecx
push eax
push str.cal_DSP_encrypt_checksum0x_x__n
mov dword [ebp - 0x28], eax
call fcn.0041ba8b
mov edx, dword [esi + 0x838]
mov bl, byte [edx + edi + 4]
mov byte [ebp - 0x20], bl
mov al, byte [edx + edi + 5]
mov byte [ebp - 0x1f], al
mov cl, byte [edx + edi + 6]
mov byte [ebp - 0x1e], cl
mov dl, byte [edx + edi + 7]
movzx eax, al
movzx edi, bl
shl edi, 8
or edi, eax
mov byte [ebp - 0x1d], dl
shl edi, 8
movzx eax, cl
or edi, eax
movzx eax, dl
shl edi, 8
or edi, eax
push edi
push str.dsp_encrypt_checksum0x_x__n
call fcn.0041ba8b
mov al, byte [esi + 0xa80]
add esp, 0x24
cmp byte [esi + 0x847], 2
jne 0x48efcb
cmp al, 1
jne 0x48efed
cmp dword [ebp - 0x28], edi
je 0x48effd
push str.DSP_checksum_error__n
call fcn.0041ba8b
push dword [esi + 0x840]
call fcn.004a45f7
and dword [esi + 0x840], 0
pop ecx
jmp 0x48ed81
mov al, byte [esi + 0x846]
cmp al, byte [esi + 0x845]
jne 0x48efcb
jmp 0x48efc6
mov byte [esi + 0x844], 1
xor eax, eax
jmp 0x48edb7