Function at 0x451850
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov dword [ebp - 0x20], eax
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov dword [esp], str.Disk_image_analysis:
call fcn.0043efa9
mov eax, esi
call fcn.0044ebdc
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x18], edx
mov ebx, eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], 3
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x3c], eax
sub esp, 0x1c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
test ebx, ebx
je 0x4518c8
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov dword [esp], edi
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push eax
cmp dword [ebp - 0x3c], 0xffffffff
jne 0x4518ef
mov dword [esp + 4], esi
mov bl, 0xff
mov dword [esp], str.__Could_not_open_image__s
call fcn.0043efa9
jmp 0x451c3f
mov byte [0x513313], 0
xor edx, edx
test esi, esi
je 0x45191b
mov dword [esp], esi
call sub.msvcrt.dll_strlen
xor edx, edx
cmp eax, 4
jbe 0x45191b
lea edx, [esi + eax - 1]
cmp byte [edx], 0x2e
je 0x45191b
cmp esi, edx
je 0x45191b
dec edx
jmp 0x45190f
test edx, edx
mov eax, str._NULL_
cmovne eax, edx
xor edi, edi
mov ebx, eax
mov eax, dword [edi*8 + 0x4b4c20]
test eax, eax
jne 0x451939
mov eax, str._NULL_
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
jne 0x451b41
mov al, byte [edi*8 + 0x4b4c24]
mov byte [ebp - 0x40], al
mov byte [0x513313], al
mov dword [esp], 0x200
call sub.msvcrt.dll_malloc
mov ebx, eax
test eax, eax
je 0x451b22
xor eax, eax
cmp byte [ebp - 0x40], 8
mov dword [0x4e2900], eax
ja 0x4519d6
xor eax, eax
mov dword [esp + 0x18], 0x4e2900
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], fcn.0043efa9
mov dword [esp], eax
call fcn.0045564d
movzx eax, byte [ebp - 0x40]
mov dword [esp], esi
mov dword [esp + 8], 0x200
mov dword [esp + 0xc], eax
mov dword [esp + 4], ebx
call fcn.00455277
mov esi, eax
mov edi, edx
call fcn.004556d3
jmp 0x451ac4
cmp byte [ebp - 0x40], 9
jne 0x451a6d
cmp dword [0x526c68], 0
je 0x451b07
mov eax, esi
call fcn.0044fd65
test eax, eax
je 0x451ae9
mov byte [0x5132f6], 1
xor edi, edi
mov dword [esp + 0xc], eax
mov dword [ebp - 0x44], eax
mov dword [esp + 8], 0x200
mov dword [esp + 4], 1
mov dword [esp], ebx
call sub.msvcrt.dll_fread
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x40], eax
mov esi, eax
mov dword [esp], edx
call sub.msvcrt.dll_fclose
lea eax, [ebx + 4]
mov dword [esp + 8], 0xc
mov dword [esp + 4], str.SignedImage
mov dword [esp], eax
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x451ac4
mov word [ebx + 0x1fe], 0xaa55
mov ecx, dword [ebp - 0x40]
cmp ecx, 0x200
jne 0x451b1a
jmp 0x451ae2
mov dword [esp], esi
call fcn.00451503
test eax, eax
je 0x451b15
mov byte [0x5132f6], 1
call fcn.0044fd65
test eax, eax
je 0x451b15
mov dword [esp + 0xc], eax
xor edi, edi
mov dword [ebp - 0x40], eax
mov dword [esp + 8], 0x200
mov dword [esp + 4], 1
mov dword [esp], ebx
call sub.msvcrt.dll_fread
mov edx, dword [ebp - 0x40]
mov esi, eax
mov dword [esp], edx
call sub.msvcrt.dll_fclose
call fcn.00451458
test edi, edi
jne 0x451b1a
cmp esi, 0x200
jne 0x451b1a
cmp byte [ebx + 0x1fe], 0x55
jne 0x451b26
cmp byte [ebx + 0x1ff], 0xaa
jne 0x451b26
mov esi, 1
jmp 0x451b35
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp + 4], esi
mov dword [esp], str.Could_not_open__s:__d
mov dword [esp + 8], eax
call fcn.0043efa9
jmp 0x451b1a
mov dword [esp], str.__An_FFU_image_was_selected__but_this_system_does_not_have_FFU_support_
call fcn.0043efa9
jmp 0x451b1a
call fcn.00451458
mov dword [esp], ebx
call sub.msvcrt.dll_free
xor eax, eax
jmp 0x451b4d
xor eax, eax
cmp dword [0x526c74], 0
setne al
lea esi, [eax + eax]
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov eax, esi
jmp 0x451b4d
inc edi
cmp edi, 0xa
jne 0x451929
jmp 0x451b22
cmp byte [0x513313], 0
je 0x451b5d
test al, al
setne bl
jmp 0x451b88
xor edi, edi
mov dword [esp + 4], str.__Image
mov bl, 1
mov dword [esp + 8], edi
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call fcn.0040adbb
test eax, eax
jne 0x451b88
cmp dword [0x526c74], 0
setne bl
add ebx, ebx
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetFileSizeEx]
push esi
push esi
test eax, eax
jne 0x451bbd
call fcn.0043f53d
mov dword [esp], str.__Could_not_get_image_size:__s
mov bl, 0xfe
mov dword [esp + 4], eax
call fcn.0043efa9
jmp 0x451c3f
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], 8
mov dword [0x5132d4], edx
xor edx, edx
mov dword [0x5132d0], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edx
mov dword [esp + 4], edx
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointerEx]
xor ecx, ecx
lea eax, [ebp - 0x2c]
sub esp, 0x14
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
sub esp, 0x14
test eax, eax
je 0x451c3a
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
xor eax, 0x4957534d
xor edx, 0x4d
or eax, edx
sete al
movzx eax, al
mov byte [0x5132f7], al
mov eax, dword [ebp - 0x3c]
dec eax
cmp eax, 0xfffffffd
ja 0x451c55
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret