Function at 0x465081
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0xa4
mov dword [ebp - 0x58], 5
sub esp, 0xc
mov edx, dword [ebp - 0x58]
mov eax, edx
shl eax, 3
sub eax, edx
shl eax, 2
push eax
call fcn.004a2e27
add esp, 0x10
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x5c], 0
sub esp, 4
push 0
push 0
push dword [0x4cf1f0]
call sub.msvcrt.dll__lseek
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4650f5
sub esp, 8
sub esp, 4
sub esp, 4
call sub.msvcrt.dll__errno
add esp, 4
push dword [eax]
call sub.msvcrt.dll_strerror
add esp, 8
push eax
push str.migrate_from_v2:_lseek_failed:__s_n
call fcn.0049d8b6
mov dword [ebp - 0x9c], 0
sub esp, 4
push 0x28
lea eax, [ebp - 0x98]
push eax
push dword [0x4cf1f0]
call sub.msvcrt.dll__read
add esp, 0x10
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0xffffffff
jne 0x46512e
call sub.msvcrt.dll__errno
cmp dword [eax], 4
jne 0x46512e
jmp 0x4650ff
cmp dword [ebp - 0x50], 0
jne 0x465139
jmp 0x46527f
cmp dword [ebp - 0x50], 0x28
je 0x46514c
sub esp, 0xc
push str.migrate_vfrom_v2:_read_error_or_short_read_n
call fcn.0049d8b6
cmp byte [ebp - 0x98], 2
je 0x46515a
jmp 0x465272
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x58]
jne 0x46518a
lea eax, [ebp - 0x58]
add dword [eax], 0x3e8
sub esp, 8
mov edx, dword [ebp - 0x58]
mov eax, edx
shl eax, 3
sub eax, edx
shl eax, 2
push eax
push dword [ebp - 0x54]
call fcn.004a2f05
add esp, 0x10
mov dword [ebp - 0x54], eax
mov edx, dword [ebp - 0x5c]
mov eax, edx
shl eax, 3
sub eax, edx
lea ecx, [eax*4]
mov ebx, dword [ebp - 0x54]
mov eax, 0
mov al, byte [ebp - 0x92]
mov edx, eax
shl edx, 0x18
mov eax, 0
mov al, byte [ebp - 0x91]
shl eax, 0x10
or edx, eax
mov eax, 0
mov al, byte [ebp - 0x90]
shl eax, 8
or edx, eax
mov eax, 0
mov al, byte [ebp - 0x8f]
or eax, edx
mov dword [ecx + ebx], eax
mov edx, dword [ebp - 0x5c]
mov eax, edx
shl eax, 3
sub eax, edx
lea ecx, [eax*4]
mov edx, dword [ebp - 0x54]
mov al, byte [ebp - 0x86]
mov byte [ecx + edx + 4], al
mov edx, dword [ebp - 0x5c]
mov eax, edx
shl eax, 3
sub eax, edx
lea edx, [eax*4]
mov eax, dword [ebp - 0x54]
mov byte [edx + eax + 5], 0
sub esp, 4
push 0x14
push 0
mov edx, dword [ebp - 0x5c]
mov eax, edx
shl eax, 3
sub eax, edx
shl eax, 2
add eax, dword [ebp - 0x54]
add eax, 6
push eax
call sub.msvcrt.dll_memset
add esp, 0x10
mov edx, dword [ebp - 0x5c]
mov eax, edx
shl eax, 3
sub eax, edx
lea edx, [eax*4]
mov eax, dword [ebp - 0x54]
cmp dword [edx + eax], 0
je 0x465272
mov edx, dword [ebp - 0x5c]
mov eax, edx
shl eax, 3
sub eax, edx
lea edx, [eax*4]
mov eax, dword [ebp - 0x54]
cmp byte [edx + eax + 4], 0
je 0x465272
lea eax, [ebp - 0x5c]
inc dword [eax]
lea eax, [ebp - 0x9c]
inc dword [eax]
jmp 0x4650ff
sub esp, 8
push dword [ebp - 0x5c]
push str.found__d_ownertrust_records_n
call fcn.0049d7de
add esp, 0x10
sub esp, 4
push 0
push 0
push dword [0x4cf1f0]
call sub.msvcrt.dll__lseek
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4652d2
sub esp, 8
sub esp, 4
sub esp, 4
call sub.msvcrt.dll__errno
add esp, 4
push dword [eax]
call sub.msvcrt.dll_strerror
add esp, 8
push eax
push str.migrate_from_v2:_lseek_failed:__s_n
call fcn.0049d8b6
mov dword [ebp - 0x9c], 0
sub esp, 4
push 0x28
lea eax, [ebp - 0x98]
push eax
push dword [0x4cf1f0]
call sub.msvcrt.dll__read
add esp, 0x10
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0xffffffff
jne 0x46530b
call sub.msvcrt.dll__errno
cmp dword [eax], 4
jne 0x46530b
jmp 0x4652dc
cmp dword [ebp - 0x50], 0
jne 0x465316
jmp 0x4653bc
cmp dword [ebp - 0x50], 0x28
je 0x465329
sub esp, 0xc
push str.migrate_from_v2:_read_error_or_short_read_n
call fcn.0049d8b6
cmp byte [ebp - 0x98], 3
je 0x465334
jmp 0x4653af
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x5c]
jge 0x4653af
mov edx, dword [ebp - 0x4c]
mov eax, edx
shl eax, 3
sub eax, edx
lea edx, [eax*4]
mov eax, dword [ebp - 0x54]
mov eax, dword [edx + eax]
cmp eax, dword [ebp - 0x9c]
jne 0x4653a8
sub esp, 4
push 0x14
lea eax, [ebp - 0x98]
add eax, 0x14
push eax
mov edx, dword [ebp - 0x4c]
mov eax, edx
shl eax, 3
sub eax, edx
shl eax, 2
add eax, dword [ebp - 0x54]
add eax, 6
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x10
mov edx, dword [ebp - 0x4c]
mov eax, edx
shl eax, 3
sub eax, edx
lea edx, [eax*4]
mov eax, dword [ebp - 0x54]
mov byte [edx + eax + 5], 1
jmp 0x4653af
lea eax, [ebp - 0x4c]
inc dword [eax]
jmp 0x46533b
lea eax, [ebp - 0x9c]
inc dword [eax]
jmp 0x4652dc
sub esp, 8
push 0
push dword [0x4cf1f0]
call sub.msvcrt.dll__chsize
add esp, 0x10
test eax, eax
je 0x4653ff
sub esp, 4
sub esp, 8
sub esp, 4
call sub.msvcrt.dll__errno
add esp, 4
push dword [eax]
call sub.msvcrt.dll_strerror
add esp, 0xc
push eax
push dword [0x4fd060]
push str.cant_truncate___s:__s_n
call fcn.0049d8b6
call fcn.00462610
test eax, eax
je 0x46541b
sub esp, 8
push dword [0x4fd060]
push str.failed_to_recreate_version_record_of___s_n
call fcn.0049d8b6
call fcn.00462f8c
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x5c]
jge 0x4654fa
mov edx, dword [ebp - 0x4c]
mov eax, edx
shl eax, 3
sub eax, edx
lea edx, [eax*4]
mov eax, dword [ebp - 0x54]
cmp byte [edx + eax + 5], 0
jne 0x46545d
jmp 0x4654f0
sub esp, 4
push 0x38
push 0
lea eax, [ebp - 0x48]
push eax
call sub.msvcrt.dll_memset
add esp, 0x10
call fcn.00464c21
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x48], 0xc
sub esp, 4
push 0x14
mov edx, dword [ebp - 0x4c]
mov eax, edx
shl eax, 3
sub eax, edx
shl eax, 2
add eax, dword [ebp - 0x54]
add eax, 6
push eax
lea eax, [ebp - 0x48]
add eax, 0x14
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x10
mov edx, dword [ebp - 0x4c]
mov eax, edx
shl eax, 3
sub eax, edx
lea edx, [eax*4]
mov eax, dword [ebp - 0x54]
mov al, byte [edx + eax + 4]
mov byte [ebp - 0x20], al
sub esp, 0xc
lea eax, [ebp - 0x48]
push eax
call fcn.00464595
add esp, 0x10
test eax, eax
je 0x4654e8
sub esp, 8
push dword [0x4fd060]
push str.failed_to_write_trust_record_of___s_n
call fcn.0049d8b6
lea eax, [ebp - 0xa4]
inc dword [eax]
lea eax, [ebp - 0x4c]
inc dword [eax]
jmp 0x465431
call fcn.0045eaa6
call fcn.00462447
mov dword [ebp - 0xa0], eax
cmp dword [ebp - 0xa0], 0
je 0x465526
sub esp, 8
push dword [0x4fd060]
push str.failed_to_sync___s_n
call fcn.0049d8b6
sub esp, 8
push dword [ebp - 0xa4]
push str.migrated__d_version_2_ownertrusts_n
call fcn.0049d7de
add esp, 0x10
sub esp, 0xc
push dword [ebp - 0x54]
call fcn.004a2f78
add esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret