Function at 0x478600
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xac
mov eax, dword [0x7e2670]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 0xac], ecx
mov eax, dword [ebp - 0xac]
movzx ecx, byte [eax + 0x20]
test ecx, ecx
jne 0x478657
mov ecx, dword [ebp - 0xac]
call fcn.00478440
mov edx, dword [ebp - 0xac]
movzx eax, byte [edx + 0x20]
test eax, eax
jne 0x478657
push str.error:invalid_iot_ota_file._r_n
call fcn.0066610b
add esp, 4
mov eax, 1
jmp 0x4788c2
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov byte [ebp - 0x50], 0
push 0x3f
push 0
lea ecx, [ebp - 0x4f]
push ecx
call fcn.006665c0
add esp, 0xc
push 0x70a430
mov ecx, dword [ebp - 0xac]
add ecx, 4
call fcn.00404810
push eax
call fcn.00669fd1
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4786cc
push str.error:open_file_fail._r_n
call fcn.0066610b
add esp, 4
mov dword [ebp - 0x58], 1
jmp 0x478881
push 2
push 0
mov edx, dword [ebp - 8]
push edx
call fcn.00669e99
add esp, 0xc
mov eax, dword [ebp - 8]
push eax
call fcn.00669daa
add esp, 4
mov dword [ebp - 0x54], eax
push 0
push 0
mov ecx, dword [ebp - 8]
push ecx
call fcn.00669e99
add esp, 0xc
mov edx, dword [ebp - 0x54]
push edx
call fcn.00576bfc
add esp, 4
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x54]
push ecx
push 0
mov edx, dword [ebp - 0x5c]
push edx
call fcn.006665c0
add esp, 0xc
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x54]
push ecx
push 1
mov edx, dword [ebp - 0x5c]
push edx
call fcn.00669b18
add esp, 0x10
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x47874d
cmp dword [ebp - 0x60], 0x40
jge 0x478766
push str.error:read_file_fail._r_n
call fcn.0066610b
add esp, 4
mov dword [ebp - 0x58], 1
jmp 0x478881
push 0x40
mov eax, dword [ebp - 0x5c]
add eax, 9
push eax
lea ecx, [ebp - 0x50]
push ecx
call fcn.00668860
add esp, 0xc
mov byte [ebp - 0xa0], 0
push 0x3f
push 0
lea edx, [ebp - 0x9f]
push edx
call fcn.006665c0
add esp, 0xc
push 0x18
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0xa0]
push ecx
call fcn.00668860
add esp, 0xc
lea edx, [ebp - 0xa0]
push edx
mov ecx, dword [ebp + 8]
call fcn.004047f0
push 0x40
push 0
lea eax, [ebp - 0xa0]
push eax
call fcn.006665c0
add esp, 0xc
push 0x20
lea ecx, [ebp - 0x38]
push ecx
lea edx, [ebp - 0xa0]
push edx
call fcn.00668860
add esp, 0xc
lea eax, [ebp - 0xa0]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x1c
call fcn.004047f0
push 0x40
push 0
lea ecx, [ebp - 0xa0]
push ecx
call fcn.006665c0
add esp, 0xc
movzx edx, byte [ebp - 0x17]
push edx
movzx eax, byte [ebp - 0x18]
push eax
push 0x70a464
lea ecx, [ebp - 0xa0]
push ecx
call fcn.0066926d
add esp, 0x10
lea edx, [ebp - 0xa0]
push edx
mov ecx, dword [ebp + 8]
add ecx, 0x38
call fcn.004047f0
push 0x40
push 0
lea eax, [ebp - 0xa0]
push eax
call fcn.006665c0
add esp, 0xc
movzx ecx, byte [ebp - 0x15]
push ecx
movzx edx, byte [ebp - 0x16]
push edx
push str._d._02d
lea eax, [ebp - 0xa0]
push eax
call fcn.0066926d
add esp, 0x10
lea ecx, [ebp - 0xa0]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x54
call fcn.004047f0
xor edx, edx
jne 0x47868e
cmp dword [ebp - 0x5c], 0
je 0x4788a6
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0xa8], eax
mov ecx, dword [ebp - 0xa8]
push ecx
call fcn.00576bf1
add esp, 4
mov dword [ebp - 0x5c], 0
cmp dword [ebp - 8], 0
je 0x4788bf
mov edx, dword [ebp - 8]
push edx
call fcn.00669ba2
add esp, 4
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.006665ac
mov esp, ebp
pop ebp
ret 4