Function at 0x404fb0
Capabilities:
Read file on windows

Disassembly:
push r13
push r12
mov eax, 0x2288
push rbp
push rdi
push rsi
push rbx
call fcn.0048ac50
sub rsp, rax
lea rsi, [rsp + 0xb0]
mov rbp, rcx
mov rbx, rdx
call fcn.0044afd0
xor r9d, r9d
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x1a4
mov r8, rbp
mov rdx, rsi
mov rcx, rax
call fcn.00450c00
test eax, eax
mov edi, eax
js 0x405630
mov rcx, rsi
call fcn.00450b30
lea rdx, [0x004c3458]
mov ecx, edi
call sub.msvcrt.dll__fdopen
lea rcx, [rsp + 0x280]
mov edx, 1
mov r9, rax
mov r8d, 0x2000
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x40], 0x2000
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov byte [rsp + 0x68], 0
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea rcx, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], rcx
jae 0x4050a1
mov byte [rdx + rax], 0
add qword [rsp + 0x48], 1
mov rdx, qword [rsp + 0x50]
mov byte [rsp + 0x68], 1
mov r8, qword [rbx + 0x20]
mov qword [rsp + 0x78], 0
movabs r12, 0x100002600
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x70], r8
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x98], 0x100
mov dword [rsp + 0xa0], 0
mov qword [rsp + 0xa8], 0
movzx r11d, byte [rdx]
nop dword [rax + rax]
cmp r11b, 0x20
jbe 0x4051b5
movabs r12, 0x100002600
cmp r11b, 0x2f
jne 0x405250
cmp qword [rsp + 0x48], rdx
ja 0x405390
cmp byte [rsp + 0x68], 0
je 0x405824
cmp byte [rsp + 0x68], 0
mov r13d, 0x2f
jne 0x4058f9
mov r9, qword [rsp + 0x30]
mov r8, qword [rsp + 0x40]
mov edx, 1
mov rcx, qword [rsp + 0x38]
mov r10, qword [rsp + 0x58]
add qword [rsp + 0x60], r10
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea r11, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], r11
jae 0x4051ac
mov byte [rdx + rax], 0
add qword [rsp + 0x48], 1
mov rdx, qword [rsp + 0x50]
mov byte [rsp + 0x68], 1
movzx r13d, byte [rdx]
jmp 0x4058f9
bt r12, r11
jae 0x405250
cmp qword [rsp + 0x48], rdx
ja 0x405231
cmp byte [rsp + 0x68], 0
jne 0x405110
mov rcx, qword [rsp + 0x58]
mov r9, qword [rsp + 0x30]
mov edx, 1
add qword [rsp + 0x60], rcx
mov r8, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea r13, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], r13
jae 0x405228
mov byte [rdx + rax], 0
add qword [rsp + 0x48], 1
mov rdx, qword [rsp + 0x50]
mov byte [rsp + 0x68], 1
movzx r11d, byte [rdx]
jmp 0x405110
lea r8, [rdx + 1]
mov qword [rsp + 0x50], r8
movzx r11d, byte [rdx + 1]
mov rdx, r8
jmp 0x405110
mov ecx, dword [rsp + 0xa0]
test ecx, ecx
jne 0x405800
test r11b, r11b
je 0x405885
lea rcx, [rsp + 0x70]
lea rdx, [rsp + 0x30]
mov r8, rbx
call fcn.0049d6e0
mov ecx, dword [rsp + 0xa0]
test ecx, ecx
jne 0x405800
mov rdx, qword [rsp + 0x50]
movabs r12, 0x100002600
movzx r10d, byte [rdx]
nop dword [rax]
cmp r10b, 0x20
jbe 0x4054b0
movabs r12, 0x100002600
cmp r10b, 0x2f
jne 0x405550
cmp qword [rsp + 0x48], rdx
ja 0x405670
cmp byte [rsp + 0x68], 0
je 0x40579a
cmp byte [rsp + 0x68], 0
mov r13d, 0x2f
jne 0x40530e
jmp 0x405ce2
lea rcx, [rdx + 1]
mov qword [rsp + 0x50], rcx
movzx r10d, byte [rdx + 1]
mov rdx, rcx
cmp r13b, 0xa
je 0x405750
mov r13d, r10d
test r13b, r13b
je 0x405cda
cmp qword [rsp + 0x48], rdx
ja 0x4052f0
cmp byte [rsp + 0x68], 0
mov r10d, r13d
jne 0x405301
mov r9, qword [rsp + 0x30]
mov r8, qword [rsp + 0x40]
mov edx, 1
mov rcx, qword [rsp + 0x38]
mov r10, qword [rsp + 0x58]
add qword [rsp + 0x60], r10
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea r11, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], r11
jae 0x40537f
mov byte [rdx + rax], 0
add qword [rsp + 0x48], 1
mov rdx, qword [rsp + 0x50]
mov byte [rsp + 0x68], 1
movzx r10d, byte [rdx]
jmp 0x405301
lea r11, [rdx + 1]
mov qword [rsp + 0x50], r11
movzx r9d, byte [r11]
cmp r9b, 0x2a
jne 0x405d6b
cmp qword [rsp + 0x48], r11
ja 0x405992
cmp byte [rsp + 0x68], 0
je 0x405ae0
test r9b, r9b
je 0x405c70
mov rdx, qword [rsp + 0x48]
cmp r9b, 0x2a
mov r8, rdx
jne 0x405989
cmp rdx, r11
ja 0x4053f0
cmp byte [rsp + 0x68], 0
je 0x405b41
cmp rdx, r11
mov r8, rdx
jbe 0x4053dd
lea rdx, [r11 + 1]
mov qword [rsp + 0x50], rdx
movzx r9d, byte [rdx]
cmp r9b, 0x2f
jne 0x4059a0
cmp rdx, r8
jb 0x405973
cmp byte [rsp + 0x68], 0
jne 0x40512e
nop dword [rax + rax]
mov r9, qword [rsp + 0x30]
mov r8, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
mov rdx, qword [rsp + 0x58]
add qword [rsp + 0x60], rdx
mov edx, 1
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea r10, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], r10
jae 0x405477
mov byte [rdx + rax], 0
add qword [rsp + 0x48], 1
mov rdx, qword [rsp + 0x50]
mov byte [rsp + 0x68], 1
movzx r11d, byte [rdx]
cmp r11b, 0x20
ja 0x405124
bt r12, r11
jae 0x405124
cmp qword [rsp + 0x48], rdx
ja 0x405973
cmp byte [rsp + 0x68], 0
jne 0x40547b
jmp 0x405420
bt r12, r10
jae 0x405550
cmp qword [rsp + 0x48], rdx
ja 0x405530
cmp byte [rsp + 0x68], 0
jne 0x4052a0
mov r8, qword [rsp + 0x40]
mov r9, qword [rsp + 0x30]
mov edx, 1
mov rcx, qword [rsp + 0x38]
mov r13, qword [rsp + 0x58]
add qword [rsp + 0x60], r13
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea r8, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], r8
jae 0x405523
mov byte [rdx + rax], 0
add qword [rsp + 0x48], 1
mov rdx, qword [rsp + 0x50]
mov byte [rsp + 0x68], 1
movzx r10d, byte [rdx]
jmp 0x4052a0
lea rax, [rdx + 1]
mov qword [rsp + 0x50], rax
movzx r10d, byte [rdx + 1]
mov rdx, rax
jmp 0x4052a0
mov ecx, dword [rsp + 0xa0]
test ecx, ecx
jne 0x405800
test r10b, r10b
jne 0x405aa0
mov rax, qword [rbx + 0x38]
mov r13, qword [rsp + 0x80]
xor r12d, r12d
mov r8, qword [rsp + 0xa8]
mov dword [rbx + 0x50], 0
lea r9, [rax - 0x10]
mov qword [rsp + 0x88], r13
mov qword [rbx + 0x58], r8
mov qword [rbx + 0x38], r9
mov r10, qword [rax - 8]
mov rdx, qword [rax - 0x10]
mov qword [rbx + 8], r10
mov qword [rbx], rdx
mov word [rax - 2], r12w
mov rcx, qword [rbx + 0x30]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x80]
mov qword [rbx + 0x30], 0
mov qword [rbx + 0x38], 0
mov qword [rbx + 0x40], 0
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x78]
call fcn.004c0cc0
call fcn.0044afd0
xor r9d, r9d
mov rdx, rsi
mov r8d, edi
mov rcx, rax
call fcn.00450f20
mov rcx, rsi
call fcn.00450b30
mov esi, dword [rbx + 0x50]
test esi, esi
jne 0x405780
cmp word [rbx + 0xe], 3
sete al
add rsp, 0x2288
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov ecx, eax
call fcn.0044a060
mov ecx, 2
mov rbx, rax
call qword [fcn.004916a0]
lea rdx, str.unable_to_open__s:__s_n
mov r9, rbx
mov r8, rbp
mov rcx, rax
call fcn.0049abb0
xor eax, eax
add rsp, 0x2288
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
add rdx, 1
mov qword [rsp + 0x50], rdx
movzx eax, byte [rdx]
cmp al, 0x2a
jne 0x405d42
cmp qword [rsp + 0x48], rdx
ja 0x405a8b
cmp byte [rsp + 0x68], 0
je 0x405ba9
test al, al
je 0x405cb0
mov r9, qword [rsp + 0x48]
cmp al, 0x2a
mov r11, r9
jne 0x405a82
cmp r9, rdx
ja 0x4056ca
cmp byte [rsp + 0x68], 0
je 0x405c08
cmp r9, rdx
mov r11, r9
jbe 0x4056b7
add rdx, 1
mov qword [rsp + 0x50], rdx
movzx eax, byte [rdx]
cmp al, 0x2f
jne 0x40569a
cmp rdx, r11
jb 0x4058c5
cmp byte [rsp + 0x68], 0
jne 0x4052be
nop
mov r9, qword [rsp + 0x30]
mov r8, qword [rsp + 0x40]
mov edx, 1
mov rcx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x58]
add qword [rsp + 0x60], rax
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea r9, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], r9
jae 0x405747
mov byte [rdx + rax], 0
add qword [rsp + 0x48], 1
mov rdx, qword [rsp + 0x50]
mov byte [rsp + 0x68], 1
movzx r10d, byte [rdx]
nop dword [rax + rax]
cmp r10b, 0x20
ja 0x4052b4
bt r12, r10
jae 0x4052b4
cmp qword [rsp + 0x48], rdx
ja 0x4058c5
cmp byte [rsp + 0x68], 0
jne 0x405750
jmp 0x4056f0
cmp esi, 0x11
ja case.0x405797.0
lea rdi, [0x004c3468]
movsxd r11, dword [rdi + rsi*4]
add r11, rdi
jmp r11
mov rcx, qword [rsp + 0x58]
mov r8, qword [rsp + 0x40]
mov edx, 1
add qword [rsp + 0x60], rcx
mov r9, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea r8, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], r8
jae 0x405679
mov byte [rdx + rax], 0
mov byte [rsp + 0x68], 1
add qword [rsp + 0x48], 1
mov rdx, qword [rsp + 0x50]
jmp 0x405679
mov r10, qword [rsp + 0xa8]
mov r12, qword [rsp + 0x80]
mov dword [rbx + 0x50], ecx
mov qword [rsp + 0x88], r12
mov qword [rbx + 0x58], r10
jmp 0x4055ae
mov r9, qword [rsp + 0x30]
mov r8, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
mov rdx, qword [rsp + 0x58]
add qword [rsp + 0x60], rdx
mov edx, 1
call sub.msvcrt.dll_fread
mov r11, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea r9, [r11 + rax - 1]
mov qword [rsp + 0x50], r11
mov qword [rsp + 0x48], r9
jae 0x405399
mov byte [r11 + rax], 0
mov byte [rsp + 0x68], 1
add qword [rsp + 0x48], 1
mov r11, qword [rsp + 0x50]
jmp 0x405399
sub rdx, qword [rsp + 0x38]
mov r9, qword [rsp + 0x60]
mov dword [rsp + 0xa0], 1
mov dword [rbx + 0x50], 1
add r9, rdx
mov rdx, qword [rsp + 0x80]
mov qword [rsp + 0xa8], r9
mov qword [rbx + 0x58], r9
mov qword [rsp + 0x88], rdx
jmp 0x4055ae
lea r8, [rdx + 1]
mov qword [rsp + 0x50], r8
movzx r10d, byte [rdx + 1]
mov rdx, r8
jmp 0x405750
lea r8, [rdx + 1]
mov qword [rsp + 0x50], r8
movzx r11d, byte [rdx + 1]
mov rdx, r8
cmp r13b, 0xa
je 0x40547b
mov r13d, r11d
test r13b, r13b
je 0x405cd2
cmp qword [rsp + 0x48], rdx
ja 0x4058db
cmp byte [rsp + 0x68], 0
mov r11d, r13d
jne 0x4058ec
mov rcx, qword [rsp + 0x38]
mov r9, qword [rsp + 0x30]
mov edx, 1
mov r8, qword [rsp + 0x40]
mov rax, qword [rsp + 0x58]
add qword [rsp + 0x60], rax
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea rcx, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], rcx
jae 0x40596a
mov byte [rdx + rax], 0
add qword [rsp + 0x48], 1
mov rdx, qword [rsp + 0x50]
mov byte [rsp + 0x68], 1
movzx r11d, byte [rdx]
jmp 0x4058ec
lea r9, [rdx + 1]
mov qword [rsp + 0x50], r9
movzx r11d, byte [rdx + 1]
mov rdx, r9
jmp 0x40547b
cmp r11, rdx
jae 0x4053b2
lea rdx, [r11 + 1]
mov qword [rsp + 0x50], rdx
movzx r9d, byte [r11 + 1]
mov r11, rdx
jmp 0x4053bd
lea r9, [0x004c31d0]
mov r8d, dword [rbx + 0x58]
lea rcx, str._s__d_:__s_n
mov rdx, rbp
call fcn.0049ab60
xor eax, eax
add rsp, 0x2288
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
lea r9, [0x004c31b2]
jmp 0x4059af
lea r9, [0x004c3428]
jmp 0x4059af
lea r9, [0x004c3270]
jmp 0x4059af
lea r9, [0x004c3240]
jmp 0x4059af
lea r9, [0x004c3218]
jmp 0x4059af
lea r9, [0x004c3208]
jmp 0x4059af
lea r9, [0x004c3400]
jmp 0x4059af
lea r9, [0x004c33e5]
jmp 0x4059af
lea r9, [0x004c33c7]
jmp 0x4059af
lea r9, [0x004c33a0]
jmp 0x4059af
lea r9, [0x004c3384]
jmp 0x4059af
lea r9, [0x004c3358]
jmp 0x4059af
lea r9, [0x004c3330]
jmp 0x4059af
lea r9, [0x004c3300]
jmp 0x4059af
lea r9, [0x004c32d0]
jmp 0x4059af
lea r9, [0x004c32a0]
jmp 0x4059af
lea r9, [0x004c31a3]
jmp 0x4059af
cmp rdx, r9
jae 0x40568f
lea r8, [rdx + 1]
mov qword [rsp + 0x50], r8
movzx eax, byte [rdx + 1]
mov rdx, r8
jmp 0x40569a
sub rdx, qword [rsp + 0x38]
mov r11, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x80]
mov dword [rsp + 0xa0], 2
mov dword [rbx + 0x50], 2
add r11, rdx
mov qword [rsp + 0x88], rcx
mov qword [rsp + 0xa8], r11
mov qword [rbx + 0x58], r11
jmp 0x4055ae
mov rcx, qword [rsp + 0x38]
mov r9, qword [rsp + 0x30]
mov edx, 1
mov r8, qword [rsp + 0x40]
mov r10, qword [rsp + 0x58]
add qword [rsp + 0x60], r10
call sub.msvcrt.dll_fread
mov r11, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea rcx, [r11 + rax - 1]
mov qword [rsp + 0x50], r11
mov qword [rsp + 0x48], rcx
jae 0x405b38
mov byte [r11 + rax], 0
add qword [rsp + 0x48], 1
mov r11, qword [rsp + 0x50]
mov byte [rsp + 0x68], 1
movzx r9d, byte [r11]
jmp 0x4053bd
mov r8, qword [rsp + 0x40]
mov r9, qword [rsp + 0x30]
mov edx, 1
mov rcx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x58]
add qword [rsp + 0x60], rax
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea r8, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], r8
jae 0x4053f9
mov byte [rdx + rax], 0
mov r13, qword [rsp + 0x48]
mov byte [rsp + 0x68], 1
mov rdx, qword [rsp + 0x50]
lea r8, [r13 + 1]
mov qword [rsp + 0x48], r8
jmp 0x4053f9
mov r9, qword [rsp + 0x30]
mov r8, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
mov rdx, qword [rsp + 0x58]
add qword [rsp + 0x60], rdx
mov edx, 1
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea r10, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], r10
jae 0x405c00
mov byte [rdx + rax], 0
add qword [rsp + 0x48], 1
mov rdx, qword [rsp + 0x50]
mov byte [rsp + 0x68], 1
movzx eax, byte [rdx]
jmp 0x40569a
mov rcx, qword [rsp + 0x58]
mov r9, qword [rsp + 0x30]
mov edx, 1
add qword [rsp + 0x60], rcx
mov r8, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea r11, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], r11
jae 0x4056d3
mov byte [rdx + rax], 0
mov r13, qword [rsp + 0x48]
mov byte [rsp + 0x68], 1
mov rdx, qword [rsp + 0x50]
lea r11, [r13 + 1]
mov qword [rsp + 0x48], r11
jmp 0x4056d3
mov r12, r11
sub r12, qword [rsp + 0x38]
mov dword [rsp + 0xa0], 0x11
add r12, qword [rsp + 0x60]
mov qword [rsp + 0xa8], r12
mov r11, qword [rsp + 0x80]
mov dword [rbx + 0x50], 0x11
mov qword [rbx + 0x58], r12
mov qword [rsp + 0x88], r11
jmp 0x4055ae
mov r12, rdx
sub r12, qword [rsp + 0x38]
mov dword [rsp + 0xa0], 0x11
add r12, qword [rsp + 0x60]
mov qword [rsp + 0xa8], r12
jmp 0x405c90
xor r11d, r11d
jmp 0x40547b
xor r10d, r10d
jmp 0x405750
mov r9, qword [rsp + 0x30]
mov r8, qword [rsp + 0x40]
mov edx, 1
mov rcx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x58]
add qword [rsp + 0x60], rax
call sub.msvcrt.dll_fread
mov rdx, qword [rsp + 0x38]
cmp rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea r13, [rdx + rax - 1]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], r13
jae 0x405d39
mov byte [rdx + rax], 0
add qword [rsp + 0x48], 1
mov rdx, qword [rsp + 0x50]
mov byte [rsp + 0x68], 1
movzx r13d, byte [rdx]
jmp 0x40530e
cmp al, 0x2f
jne 0x405cb0
cmp qword [rsp + 0x48], rdx
jbe 0x4052d4
lea r9, [rdx + 1]
mov qword [rsp + 0x50], r9
movzx r13d, byte [rdx + 1]
mov rdx, r9
jmp 0x40530e
cmp r9b, 0x2f
jne 0x405c70
cmp qword [rsp + 0x48], r11
jbe 0x405d8f
lea rdx, [r11 + 1]
mov qword [rsp + 0x50], rdx
movzx r13d, byte [r11 + 1]
jmp 0x4058f9
mov rdx, r11
jmp 0x405144