Function at 0x4f5f70
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x2018
call fcn.00549ec0
mov esi, dword [esp + 0x202c]
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x4f5fa0
mov ebx, eax
cmp eax, 0xffffffff
jne 0x4f5fc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4f5fa5
mov eax, 6
mov dword [esi + 4], 0
mov dword [esi + 8], eax
mov dword [esi], 1
mov eax, esi
add esp, 0x2018
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, dword [esp + 0x2038]
lea ebp, [esp + 0x18]
mov dword [esp + 0x18], 0
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x4f5ffa
test edi, edi
je 0x4f6024
cmp edi, 4
jae 0x4f6033
mov dword [esi + 8], str.Windows_stdin_in_console_mode_does_not_support_a_buffer_too_small_to_guarantee_holding_one_arbitrary_UTF_8_character__4_bytes_
mov dword [esi + 4], 0x1402
jmp 0x4f5faf
mov dword [esp + 0x18], 0
lea eax, [esp + 0x18]
push 0
push eax
push edi
push dword [esp + 0x2040]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4f6087
mov eax, dword [esp + 0x18]
xor ecx, ecx
jmp 0x4f60a1
mov dword [esi + 4], 0
mov dword [esi], 0
jmp 0x4f5fb5
mov esi, dword [esp + 0x2030]
push 0x2000
push 0
push ebp
call fcn.0054c590
add esp, 0xc
mov eax, edi
mov ecx, 0xaaaaaaab
mov edi, 0x1000
mul ecx
movzx eax, word [esi]
shr edx, 1
cmp edx, 0x1000
cmovb edi, edx
test ax, ax
je 0x4f60ae
mov word [esp + 0x18], ax
cmp edi, 1
mov eax, 2
mov word [esi], 0
cmove edi, eax
mov eax, 1
jmp 0x4f60b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push eax
call fcn.004f50d0
add esp, 4
xor ecx, ecx
cmp al, 0xb
setne cl
xor eax, eax
mov dword [esi], ecx
mov dword [esi + 4], eax
mov dword [esi + 8], edi
jmp 0x4f5fb5
xor eax, eax
movaps xmm0, xmmword [0x5f5140]
lea esi, [esp + eax*2 + 0x18]
sub edi, eax
mov dword [esp], eax
mov dword [esp + 4], 0
movups xmmword [esp + 8], xmm0
nop dword [eax]
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [esp + 8]
push eax
lea eax, [esp + 8]
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x4f6262
mov ecx, dword [esp + 4]
test ecx, ecx
jne 0x4f6114
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e3
je 0x4f60d0
mov ecx, dword [esp + 4]
test ecx, ecx
je 0x4f6298
lea eax, [ecx - 1]
cmp eax, edi
jae 0x4f62bb
cmp word [esi + ecx*2 - 2], 0x1a
cmovne eax, ecx
add eax, dword [esp]
mov esi, dword [esp + 0x202c]
mov edi, 0
je 0x4f62af
lea ecx, [eax - 1]
cmp ecx, 0xfff
ja 0x4f62c4
movzx edx, word [esp + eax*2 + 0x16]
mov edi, esi
mov esi, edx
and esi, 0xfc00
cmp esi, 0xd800
mov esi, edi
jne 0x4f617e
mov eax, dword [esp + 0x2030]
test ecx, ecx
mov edi, 0
mov word [eax], dx
mov eax, ecx
je 0x4f62af
lea eax, [esp + eax*2 + 0x18]
xor edi, edi
mov dword [esp], eax
jmp 0x4f619b
add edi, eax
cmp ebp, dword [esp]
je 0x4f62af
movzx eax, word [ebp]
lea ecx, [ebp + 2]
mov edx, eax
and edx, 0xf800
cmp edx, 0xd800
jne 0x4f6202
movzx edx, ax
cmp edx, 0xdbff
ja 0x4f627e
cmp ecx, dword [esp]
je 0x4f627e
movzx ecx, word [ecx]
mov edx, ecx
and edx, 0xfc00
cmp edx, 0xdc00
jne 0x4f627e
add eax, 0x2800
add ecx, 0x2400
add ebp, 4
movzx eax, ax
movzx ebx, cx
shl eax, 0xa
or ebx, eax
add ebx, 0x10000
jmp 0x4f6207
movzx ebx, ax
mov ebp, ecx
mov eax, dword [esp + 0x2038]
mov ecx, dword [esp + 0x2034]
cmp edi, eax
ja 0x4f62d9
sub eax, edi
lea edx, [ecx + edi]
mov ecx, ebx
push eax
call fcn.004d9940
add esp, 4
mov eax, 1
cmp ebx, 0x80
jb 0x4f6190
mov eax, 2
cmp ebx, 0x800
jb 0x4f6190
cmp ebx, 0x10000
mov eax, 4
sbb eax, 0
jmp 0x4f6190
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [esp + 0x202c]
mov dword [esi + 8], eax
mov dword [esi + 4], 0
jmp 0x4f5faf
mov eax, 1
mov dword [esi + 8], 0x5f7dac
mov dword [esi + 4], 0x1502
mov dword [esi], eax
jmp 0x4f5fb5
xor eax, eax
add eax, dword [esp]
mov esi, dword [esp + 0x202c]
mov edi, 0
jne 0x4f613d
xor eax, eax
mov dword [esi + 4], edi
mov dword [esi], eax
jmp 0x4f5fb5
push 0x5f7d3c
push edi
push eax
jmp 0x4f62cf
push 0x5f7d2c
push 0x1000
push ecx
call fcn.00570800
add esp, 0xc
ud2
push 0x5f7db4
push eax
push edi
call fcn.00570970
add esp, 0xc
ud2