Function at 0x486f20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov dword [ebp - 0x10], ecx
cmp dword [ebp + 8], 0
jne 0x486f46
push 0
push 0
push 0
push 2
mov ecx, dword [ebp - 0x10]
call fcn.0048b560
xor al, al
jmp 0x48711e
mov ecx, dword [ebp - 0x10]
call fcn.00485cc0
mov ecx, dword [ebp - 0x10]
add ecx, 4
call fcn.00485ca0
mov dword [ebp - 0x18], 0
push 2
push 0
mov eax, dword [ebp + 8]
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ftell
add esp, 4
mov dword [ebp - 0x18], eax
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
cmp dword [ebp - 0x18], 0
jg 0x486fac
push 0
push 0
push 0
push 0xc
mov ecx, dword [ebp - 0x10]
call fcn.0048b560
xor al, al
jmp 0x48711e
mov eax, dword [ebp - 0x18]
add eax, 1
push eax
call sub.mfc140u.dll_operator
add esp, 4
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 8], ecx
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp - 8]
mov byte [ecx + eax], 0
mov edx, dword [ebp + 8]
push edx
push 1
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 8]
push ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
cmp eax, 1
je 0x487033
mov edx, dword [ebp - 8]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
push eax
call sub.mfc140u.dll_operator_1
add esp, 4
cmp dword [ebp - 0x1c], 0
jne 0x48700f
mov dword [ebp - 0x2c], 0
jmp 0x48701c
mov dword [ebp - 8], 0x8123
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x2c], ecx
push 0
push 0
push 0
push 2
mov ecx, dword [ebp - 0x10]
call fcn.0048b560
xor al, al
jmp 0x48711e
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov byte [ebp - 1], 0xd
mov byte [ebp - 2], 0xa
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0x18]
mov byte [ecx], 0
mov edx, dword [ebp - 0xc]
movsx eax, byte [edx]
test eax, eax
je 0x4870b1
mov ecx, dword [ebp - 0xc]
movsx edx, byte [ecx]
cmp edx, 0xd
jne 0x487093
mov eax, dword [ebp - 0x14]
mov byte [eax], 0xa
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
movsx ecx, byte [eax]
cmp ecx, 0xa
jne 0x487091
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
jmp 0x4870af
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
jmp 0x487050
mov edx, dword [ebp - 0x14]
mov byte [edx], 0
mov eax, dword [ebp + 0xc]
push eax
push 0
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x10]
mov edx, dword [eax + 8]
call edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
push ecx
call sub.mfc140u.dll_operator_1
add esp, 4
cmp dword [ebp - 0x20], 0
jne 0x4870ef
mov dword [ebp - 0x30], 0
jmp 0x4870fc
mov dword [ebp - 8], 0x8123
mov edx, dword [ebp - 8]
mov dword [ebp - 0x30], edx
mov ecx, dword [ebp - 0x10]
call fcn.00485a80
movzx eax, al
test eax, eax
jne 0x487114
mov dword [ebp - 0x24], 1
jmp 0x48711b
mov dword [ebp - 0x24], 0
mov al, byte [ebp - 0x24]
mov esp, ebp
pop ebp
ret 8