Function at 0x401790
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov ecx, esp
mov dword [ecx], eax
mov dword [ecx + 0x18], 0
mov dword [ecx + 0x14], 0x80
mov dword [ecx + 0x10], 3
mov dword [ecx + 0xc], 0
mov dword [ecx + 8], 1
mov dword [ecx + 4], 0x80000000
call sub.KERNEL32.DLL_CreateFileA
sub esp, 0x1c
mov ecx, 0xffffffff
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], ecx
jne 0x40181b
lea eax, [0x4141c0]
add eax, 0x30
lea ecx, str.Could_not_open__s_n
mov edx, dword [ebp - 0xc]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.00409874
mov dword [ebp - 4], 0
mov dword [ebp - 0x24], eax
jmp 0x401a85
mov eax, dword [ebp - 0x10]
mov ecx, esp
mov dword [ecx], eax
mov dword [ecx + 0x14], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0xc], 0
mov dword [ecx + 8], 2
mov dword [ecx + 4], 0
call sub.KERNEL32.DLL_CreateFileMappingA
sub esp, 0x18
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov ecx, esp
mov dword [ecx], eax
mov dword [ecx + 0x10], 0
mov dword [ecx + 0xc], 0
mov dword [ecx + 8], 0
mov dword [ecx + 4], 4
call sub.KERNEL32.DLL_MapViewOfFile
sub esp, 0x14
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
mov eax, dword [ebp - 0x10]
mov ecx, esp
mov dword [ecx], eax
mov dword [ecx + 4], 0
call sub.KERNEL32.DLL_GetFileSize
sub esp, 8
mov ecx, dword [ebp - 8]
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x10]
mov ecx, esp
mov dword [ecx], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x18]
cmp dword [ecx], 0x1eabb7d7
mov dword [ebp - 0x28], eax
jne 0x4018ec
lea eax, str.000000__Android_header_n
mov dword [esp], eax
call fcn.00409fac
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx + 0x24]
mov edx, esp
mov dword [edx], ecx
mov dword [ebp - 0x2c], eax
call fcn.004045f0
sub esp, 4
mov ecx, dword [ebp - 0x18]
add ecx, eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov ecx, esp
mov dword [ecx], eax
call fcn.004045b0
sub esp, 4
cmp eax, 0xd00dfeed
je 0x40195e
cmp dword [ebp - 0x20], 0
jle 0x401939
lea eax, str._06x_n
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 8]
mov edx, dword [edx]
sub ecx, edx
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00409fac
mov dword [ebp - 0x30], eax
lea eax, [0x4141c0]
add eax, 0x30
lea ecx, str.Signature_not_found_n
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00409874
mov dword [ebp - 0x34], eax
jmp 0x401a1d
cmp dword [ebp - 0x20], 0
jle 0x40199f
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x1c]
jbe 0x40198e
lea eax, str._06x_n
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 8]
mov edx, dword [edx]
sub ecx, edx
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00409fac
mov dword [ebp - 0x38], eax
lea eax, [0x413284]
mov dword [esp], eax
call fcn.00409fac
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00401240
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4019bf
jmp 0x401a1d
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
mov edx, dword [ebp - 8]
add ecx, dword [edx + 4]
cmp eax, ecx
jb 0x4019de
jmp 0x401a1d
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
sub eax, ecx
and eax, 3
cmp eax, 0
je 0x401a18
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
cmp eax, 0
je 0x401a09
jmp 0x401a18
jmp 0x401a0b
mov eax, dword [ebp - 0x18]
add eax, 1
mov dword [ebp - 0x18], eax
jmp 0x4019e4
jmp 0x4018f9
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov ecx, esp
mov dword [ecx], eax
call sub.KERNEL32.DLL_UnmapViewOfFile
sub esp, 4
mov ecx, dword [ebp - 0x14]
mov edx, esp
mov dword [edx], ecx
mov dword [ebp - 0x40], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
cmp dword [ebp - 0x20], 1
mov dword [ebp - 0x44], eax
jle 0x401a73
lea eax, [0x4141c0]
add eax, 0x30
lea ecx, str.Found__u_separate_DTB_n
mov edx, dword [ebp - 0x20]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.00409874
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x18], 0
setne al
and al, 1
movzx ecx, al
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
add esp, 0x64
pop ebp
ret