Function at 0x404b40
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [0x40c078]
mov edi, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call edi
mov edx, dword [ebp + 8]
test edx, edx
je 0x404d20
mov eax, dword [0x40c074]
test eax, eax
je 0x404cf0
mov esi, dword [0x40c06c]
test esi, esi
je 0x404d20
mov dword [ebp - 0x10], edi
mov edi, esi
mov dword [esp + 4], 0x40a320
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strpbrk]
test eax, eax
jne 0x404d50
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strlen]
mov esi, dword [0x40c070]
mov dword [esp + 4], edi
mov ebx, eax
lea eax, [eax + 1]
mov dword [esp + 8], eax
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_memmove]
mov edi, dword [0x40c074]
mov eax, edi
sub eax, ebx
cmp eax, 2
jbe 0x404cc8
mov edx, edi
mov eax, dword [ebp + 8]
lea ecx, [esi + ebx]
mov dword [esp + 4], 1
sub edx, ebx
mov dword [esp], ecx
sub edx, 1
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
call dword [sym.imp.ucrtbase.dll_fread]
test eax, eax
jne 0x404ca0
mov ebx, dword [0x40c070]
mov dword [0x40c06c], 0
test ebx, ebx
je 0x404c8d
mov edx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 8], ebx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x10], edx
call edx
sub esp, 0x18
mov edi, eax
lea eax, [eax + eax]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp + 8], ebx
mov dword [esp + 0x14], edi
mov esi, eax
mov dword [esp + 0x10], eax
mov ebx, esi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0
mov edx, dword [ebp - 0x10]
call edx
sub esp, 0x18
mov dword [0x40c078], ebx
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [0x40c070]
add ebx, edi
mov dword [0x40c06c], edi
mov byte [ebx + eax], 0
test edi, edi
jne 0x404b84
mov esi, edi
mov edi, dword [ebp - 0x10]
jmp 0x404d26
add edi, edi
mov dword [0x40c074], edi
mov dword [esp], esi
mov dword [esp + 4], edi
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [0x40c070], eax
mov esi, eax
jmp 0x404bd5
mov dword [0x40c074], 0x1000
mov dword [esp], 0x1000
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [0x40c070], eax
mov esi, eax
mov byte [eax], 0
mov dword [0x40c06c], eax
jmp 0x404b7f
mov esi, dword [0x40c070]
mov dword [0x40c078], 0
xor ebx, ebx
mov dword [esp], esi
call edi
mov eax, ebx
mov dword [0x40c074], 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [eax + 1]
cmp byte [eax], 0xd
mov esi, edi
mov dword [0x40c06c], edx
je 0x404de0
mov byte [eax], 0
mov edi, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
call edi
sub esp, 0x18
mov edx, eax
lea eax, [eax + eax]
mov dword [ebp - 0x10], edx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x10]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x10], eax
mov ebx, eax
mov dword [esp + 0x14], edx
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
call edi
sub esp, 0x18
jmp 0x404c8d
cmp byte [eax + 1], 0xa
jne 0x404d64
lea edx, [eax + 2]
mov dword [0x40c06c], edx
jmp 0x404d64