Function at 0x405ef8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.00412940
test eax, eax
jne 0x4060f8
mov word [ebp - 6], 0
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 2
lea eax, [ebp - 6]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 1
je 0x405f50
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
jmp 0x4060fe
cmp word [ebp - 6], 0
jne 0x405f65
mov eax, dword [ebp - 4]
add eax, 2
mov dword [ebp - 0x18], eax
jmp 0x4060fe
mov byte [ebp - 7], 0
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 1
lea eax, [ebp - 7]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 1
je 0x405f9b
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
jmp 0x4060fe
movzx eax, byte [ebp - 7]
movzx edx, word [ebp - 6]
dec edx
cmp eax, edx
jle 0x405fd5
mov dword [esp], str.ERROR:_bad_record___skipping_n
call sub.msvcrt.dll_printf
mov dword [esp + 8], 1
movzx eax, word [ebp - 6]
dec eax
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
jmp 0x405f05
movzx eax, byte [ebp - 7]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.00412910
mov dword [ebp - 0xc], eax
cmp byte [ebp - 7], 0
je 0x406035
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
movzx eax, byte [ebp - 7]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 1
je 0x406035
mov dword [esp], str.ERROR:_could_not_read_key_n
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
jmp 0x4060fe
movzx edx, byte [ebp - 7]
mov eax, dword [ebp - 0xc]
mov byte [edx + eax], 0
movzx edx, word [ebp - 6]
movzx eax, byte [ebp - 7]
sub edx, eax
mov eax, edx
dec eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00412910
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x10], 0
je 0x40609e
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 1
je 0x40609e
mov dword [esp], str.ERROR:_could_not_read_value_n
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
jmp 0x4060fe
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.00412940
test eax, eax
jne 0x4060be
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.00412950
test eax, eax
jne 0x4060be
jmp 0x4060c6
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
jmp 0x4060fe
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00405890
movzx eax, word [ebp - 6]
add eax, dword [ebp - 4]
add eax, 2
mov dword [ebp - 4], eax
jmp 0x405f05
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
leave
ret