Function at 0x406208
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.004133bc
test eax, eax
jne 0x406408
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 0x406260
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
jmp 0x40640e
cmp word [ebp - 6], 0
jne 0x406275
mov eax, dword [ebp - 4]
add eax, 2
mov dword [ebp - 0x18], eax
jmp 0x40640e
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 0x4062ab
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
jmp 0x40640e
movzx eax, byte [ebp - 7]
movzx edx, word [ebp - 6]
dec edx
cmp eax, edx
jle 0x4062e5
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 0x406215
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.0041338c
mov dword [ebp - 0xc], eax
cmp byte [ebp - 7], 0
je 0x406345
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 0x406345
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 0x40640e
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.0041338c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x10], 0
je 0x4063ae
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 0x4063ae
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 0x40640e
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.004133bc
test eax, eax
jne 0x4063ce
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.004133cc
test eax, eax
jne 0x4063ce
jmp 0x4063d6
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
jmp 0x40640e
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.00405ba0
movzx eax, word [ebp - 6]
add eax, dword [ebp - 4]
add eax, 2
mov dword [ebp - 4], eax
jmp 0x406215
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
leave
ret