Function at 0x4016c0
Capabilities:
Read file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff8
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x38
mov eax, dword [ecx + 4]
mov edi, dword [ecx + 8]
mov ebx, dword [ecx]
lea ecx, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], edi
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_ReadConsoleW]
sub esp, 0x14
test eax, eax
je 0x401770
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x401900
movzx eax, word [ebx]
cmp ax, 0xa
je 0x401930
cmp ax, 0xd
je 0x401930
xor edx, edx
jmp 0x401748
movzx eax, word [ebx + edx*2]
cmp ax, 0xa
je 0x4018f0
cmp ax, 0xd
je 0x4018f0
add edx, 1
cmp esi, edx
jne 0x401730
xor eax, eax
cmp esi, dword [ebp - 0x20]
sete al
sub esi, eax
xor eax, eax
mov word [ebx + esi*2], ax
mov eax, ebx
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov esi, eax
call dword [sym.imp.kernel32.dll_GetOEMCP]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x28], eax
mov dword [esp], edi
call dbg.xalloc
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x18], 0
mov edi, eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.kernel32.dll_SetFilePointerEx]
mov dword [esp], edx
mov dword [esp + 0x10], 1
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [ebp - 0x2c], eax
call eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x1c]
sub esp, 0x14
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x401920
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x401920
movzx edx, byte [edi]
cmp dl, 0xd
sete cl
add eax, edi
cmp edi, eax
jae 0x401937
cmp dl, 0xa
je 0x401937
test cl, cl
jne 0x401937
movzx esi, word [ebp - 0x28]
mov eax, edi
jmp 0x40184a
movzx edx, byte [eax]
cmp dl, 0xd
sete cl
cmp dl, 0xa
je 0x401910
test cl, cl
jne 0x401910
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.user32.dll_CharNextExA]
mov edx, dword [ebp - 0x1c]
sub esp, 0xc
add edx, edi
cmp eax, edx
jb 0x401830
mov esi, eax
sub esi, edi
cmp byte [eax], 0xd
lea edx, [esi + 1]
sete cl
movzx ecx, cl
mov dword [esp + 0x10], 0
add ecx, edx
mov dword [esp + 0xc], 0
mov eax, ecx
cdq
add dword [ebp - 0x18], ecx
mov eax, dword [ebp - 0x18]
adc dword [ebp - 0x14], edx
mov edx, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x2c]
call eax
mov eax, dword [ebp - 0x20]
sub esp, 0x14
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
sub esp, 0x18
mov esi, eax
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x40174f
mov esi, edx
jmp 0x40174f
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
sub eax, edi
mov esi, eax
lea edx, [eax + 1]
jmp 0x401878
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
xor eax, eax
jmp 0x401761
xor esi, esi
jmp 0x40174f
mov edx, 1
jmp 0x401878