Function at 0x140005810
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x108
mov esi, edx
xor edx, edx
mov r12, rcx
mov ebx, r8d
mov rdi, r9
call dbg.output_create
mov qword [rsp + 0x58], rax
mov qword [rax + 0x228], 0
cmp esi, ebx
jge 0x140005aaa
movsxd rax, esi
sub ebx, esi
lea rbp, [rsp + 0xc0]
lea r13, [rdi + rax*8]
add rax, rbx
lea r14, [rdi + rax*8]
mov qword [rsp + 0x60], r14
mov r14, r12
jmp 0x1400058e6
mov r8d, 0x63
mov edx, 1
mov rcx, rbx
call sym.fread
cmp rax, 0x62
jbe 0x14000592b
movabs rax, 0x2f6e61637373616d
cmp qword [rbx], rax
je 0x14000593a
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8, r15
lea rdx, str._s:_unknown_file_format__expeced__masscan_1.1___n
mov rcx, rax
call sym.fprintf
mov rcx, rbx
call sym.free
mov rcx, qword [rsp + 0xc0]
test rcx, rcx
je 0x1400058d7
call sym.fclose
add r13, 8
cmp qword [rsp + 0x60], r13
je 0x140005aaa
mov r15, qword [r13]
mov ecx, 0x100000
mov qword [rsp + 0xc0], 0
call dbg.MALLOC
lea r8, [0x1400529f4]
mov rcx, rbp
mov rbx, rax
mov rdx, r15
call qword [sym.imp.msvcrt.dll_fopen_s]
test eax, eax
jne 0x14000592b
mov r9, qword [rsp + 0xc0]
test r9, r9
jne 0x140005870
mov rcx, r15
call sym.perror
test rbx, rbx
je 0x1400058c5
jmp 0x1400058bd
cmp dword [rbx + 7], 0x312e312f
jne 0x1400058a0
cmp byte [rbx + 0xb], 0x2e
je 0x1400060a9
lea rax, [r14 + 0xcb8]
mov qword [rsp + 0x68], r15
xor esi, esi
lea r12, [0x140052a84]
mov qword [rsp + 0x78], rax
lea rax, [r14 + 0xba8]
mov qword [rsp + 0x70], rax
nop word [rax + rax]
mov r9, qword [rsp + 0xc0]
mov r8d, 1
mov edx, 1
mov rcx, rbx
call sym.fread
cmp rax, 1
jne 0x1400058bd
movzx eax, byte [rbx]
mov edi, eax
and edi, 0x7f
test al, al
js 0x1400059c9
jmp 0x1400059ea
movzx eax, byte [rbx]
shl edi, 7
mov edx, eax
and edx, 0x7f
or edi, edx
test al, al
jns 0x1400059ea
mov r9, qword [rsp + 0xc0]
mov r8d, 1
mov edx, 1
mov rcx, rbx
call sym.fread
cmp rax, 1
je 0x1400059b8
mov r9, qword [rsp + 0xc0]
mov r8d, 1
mov edx, 1
mov rcx, rbx
call sym.fread
cmp rax, 1
jne 0x1400058bd
movzx eax, byte [rbx]
mov r15d, eax
and r15d, 0x7f
test al, al
js 0x140005a33
jmp 0x140005a61
movzx eax, byte [rbx]
shl r15d, 7
mov edx, eax
and edx, 0x7f
or r15d, edx
test al, al
jns 0x140005a54
mov r9, qword [rsp + 0xc0]
mov r8d, 1
mov edx, 1
mov rcx, rbx
call sym.fread
cmp rax, 1
je 0x140005a20
cmp r15d, 0x100000
ja 0x140006136
mov r9, qword [rsp + 0xc0]
mov r8, r15
mov edx, 1
mov rcx, rbx
call sym.fread
mov r10, rax
cmp rax, r15
jb 0x1400058bd
cmp edi, 0xd
ja 0x140006058
test edi, edi
je case.0x140005aa8.0
cmp edi, 0xd
ja case.0x140005aa8.0
mov eax, edi
movsxd rax, dword [r12 + rax*4]
add rax, r12
jmp rax
mov rcx, qword [rsp + 0x58]
add rsp, 0x108
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp dbg.output_destroy
cmp r10, 3
jbe 0x14000608a
mov eax, dword [rbx]
bswap eax
mov dword [rsp + 0x8c], eax
mov r15d, eax
cmp r10, 4
je 0x14000608a
movzx eax, byte [rbx + 4]
mov byte [rsp + 0x80], al
cmp r10, 6
jbe 0x14000608a
movzx r11d, word [rbx + 5]
rol r11w, 8
cmp r10, 8
jbe 0x14000608a
movzx edi, word [rbx + 7]
rol di, 8
movzx edi, di
cmp r10, 9
je 0x14000608a
movzx eax, byte [rbx + 9]
mov byte [rsp + 0x8b], al
cmp r10, 0xa
je 0x14000608a
mov qword [rsp + 0xc8], 0xb
cmp byte [rbx + 0xa], 6
jne 0x14000608a
mov rdx, r10
lea r8, [rsp + 0xc8]
mov rcx, rbx
mov qword [rsp + 0x90], r10
mov qword [rsp + 0x98], r8
call dbg._get_long
mov r8, qword [rsp + 0x98]
mov rdx, qword [rsp + 0x90]
mov qword [rsp + 0xd8], rax
call dbg._get_long
mov r10, qword [rsp + 0x90]
mov qword [rsp + 0xe0], rax
mov rax, qword [rsp + 0x58]
cmp qword [rax + 0x228], 0
jne 0x140005bbb
mov ecx, r15d
mov qword [rax + 0x228], rcx
mov byte [rsp + 0xe8], 6
movzx r11d, r11w
mov r8d, edi
mov rax, qword [rsp + 0xe8]
lea r15, [rsp + 0xa0]
mov r9, qword [rsp + 0x70]
mov edx, r11d
movdqu xmm2, xmmword [rsp + 0xd8]
mov qword [rsp + 0xb0], rax
mov rax, qword [rsp + 0x78]
mov rcx, r15
mov qword [rsp + 0x90], r10
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x98], r11d
movups xmmword [rsp + 0xa0], xmm2
call dbg.readscan_filter_pass
test eax, eax
je 0x140005ca8
mov rax, qword [rsp + 0xc8]
mov r10, qword [rsp + 0x90]
cmp r10, rax
jb 0x140005ca8
sub r10d, eax
add rax, rbx
mov dword [rsp + 0x28], edi
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov r11d, dword [rsp + 0x98]
mov r8, r15
movzx eax, byte [rsp + 0x8b]
mov dword [rsp + 0x40], r10d
mov rdx, qword [rsp + 0xe8]
mov dword [rsp + 0x20], r11d
movdqu xmm4, xmmword [rsp + 0xd8]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0xb0], rdx
mov edx, dword [rsp + 0x8c]
movzx r9d, byte [rsp + 0x80]
movups xmmword [rsp + 0xa0], xmm4
call dbg.output_report_banner
nop dword [rax]
add rsi, 1
test si, si
jne 0x140005980
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8, qword [rsp + 0x68]
mov r9, rsi
lea rdx, str._s:__8llu_r
mov rcx, rax
call sym.fprintf
jmp 0x140005980
mov eax, dword [r14 + 0xcc0]
test eax, eax
jne 0x140005ca8
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
mov r9, r10
mov r8, rbx
mov edx, 2
mov qword [rsp + 0x20], rax
call dbg.parse_status6
jmp 0x140005ca8
mov edx, dword [r14 + 0xcc0]
test edx, edx
jne 0x140005ca8
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
mov r9, r10
mov r8, rbx
mov edx, 1
mov qword [rsp + 0x20], rax
call dbg.parse_status6
jmp 0x140005ca8
cmp r10, 0xd
jbe 0x140005ca8
mov eax, dword [rbx]
movzx edx, word [rbx + 9]
mov byte [rsp + 0xe8], 4
movzx r8d, word [rbx + 0xb]
bswap eax
mov ecx, eax
mov eax, dword [rbx + 4]
rol dx, 8
rol r8w, 8
mov dword [rsp + 0x8c], ecx
bswap eax
mov dword [rsp + 0xd8], eax
movzx eax, byte [rbx + 8]
movzx r8d, r8w
mov byte [rsp + 0x80], al
movzx eax, byte [rbx + 0xd]
mov byte [rsp + 0x8b], al
mov rax, qword [rsp + 0x58]
cmp qword [rax + 0x228], 0
jne 0x140005da4
mov qword [rax + 0x228], rcx
mov rax, qword [rsp + 0xe8]
movzx edi, dx
movdqu xmm1, xmmword [rsp + 0xd8]
lea r15, [rsp + 0xa0]
mov r9, qword [rsp + 0x70]
mov edx, edi
mov rcx, r15
mov qword [rsp + 0x98], r10
mov qword [rsp + 0xb0], rax
mov rax, qword [rsp + 0x78]
mov dword [rsp + 0x90], r8d
mov qword [rsp + 0x20], rax
movups xmmword [rsp + 0xa0], xmm1
call dbg.readscan_filter_pass
test eax, eax
je 0x140005ca8
mov rax, qword [rsp + 0xe8]
mov r10, qword [rsp + 0x98]
mov dword [rsp + 0x20], edi
mov r8d, dword [rsp + 0x90]
mov edx, dword [rsp + 0x8c]
mov qword [rsp + 0xb0], rax
lea rax, [rbx + 0xe]
sub r10, 0xe
movdqu xmm3, xmmword [rsp + 0xd8]
mov qword [rsp + 0x38], rax
mov rcx, qword [rsp + 0x58]
movzx eax, byte [rsp + 0x8b]
mov dword [rsp + 0x28], r8d
mov r8, r15
movzx r9d, byte [rsp + 0x80]
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x30], eax
movups xmmword [rsp + 0xa0], xmm3
call dbg.output_report_banner
jmp 0x140005ca8
mov ecx, dword [r14 + 0xcc0]
test ecx, ecx
jne 0x140005ca8
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
mov r9, r10
mov r8, rbx
mov edx, 2
mov qword [rsp + 0x20], rax
call dbg.parse_status2
jmp 0x140005ca8
mov r8d, dword [r14 + 0xcc0]
test r8d, r8d
jne 0x140005ca8
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
mov r9, r10
mov r8, rbx
mov edx, 1
mov qword [rsp + 0x20], rax
call dbg.parse_status2
jmp 0x140005ca8
cmp r10, 0xc
jbe 0x140005ca8
mov r8, r10
mov rcx, qword [rsp + 0x58]
mov rdx, rbx
call sym.parse_banner4.part.0
jmp 0x140005ca8
lea rcx, [rbx + r10]
mov r8d, 1
mov r9, qword [rsp + 0xc0]
mov edx, 1
mov qword [rsp + 0x80], r10
call sym.fread
mov r10, qword [rsp + 0x80]
cmp rax, 1
jne 0x140006167
lea r8, [r10 + 1]
cmp r8, 0xc
ja 0x140005eef
jmp 0x140005ca8
mov eax, dword [rbx + 4]
movzx ecx, word [rbx + 8]
mov byte [rsp + 0xe8], 4
mov rdi, qword [rsp + 0x58]
mov edx, dword [rbx]
bswap eax
mov dword [rsp + 0xd8], eax
movzx eax, word [rbx + 0xa]
rol cx, 8
bswap edx
mov edx, edx
rol ax, 8
cmp qword [rdi + 0x228], 0
movzx eax, ax
jne 0x140005f89
mov qword [rdi + 0x228], rdx
mov r8, qword [rsp + 0xe8]
mov dword [rsp + 0x28], eax
sub r10d, 0xc
movzx eax, cx
mov dword [rsp + 0x40], r10d
mov rcx, qword [rsp + 0x58]
mov r9d, 6
movdqu xmm0, xmmword [rsp + 0xd8]
mov dword [rsp + 0x20], eax
mov qword [rsp + 0xb0], r8
lea r8, [rbx + 0xc]
mov qword [rsp + 0x38], r8
lea r8, [rsp + 0xa0]
mov dword [rsp + 0x30], 0
movups xmmword [rsp + 0xa0], xmm0
call dbg.output_report_banner
jmp 0x140005ca8
mov r9d, dword [r14 + 0xcc0]
test r9d, r9d
jne 0x140005ca8
cmp r10, 0xb
jbe 0x140005ca8
mov rcx, qword [rsp + 0x58]
mov r9, r10
mov r8, rbx
mov edx, 2
call sym.parse_status.part.0
jmp 0x140005ca8
mov r11d, dword [r14 + 0xcc0]
test r11d, r11d
jne 0x140005ca8
cmp r10, 0xb
jbe 0x140005ca8
mov rcx, qword [rsp + 0x58]
mov r9, r10
mov r8, rbx
mov edx, 1
call sym.parse_status.part.0
jmp 0x140005ca8
cmp edi, 0x6d
je 0x140005ca8
nop dword [rax]
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, edi
lea rdx, str.file_corrupt:_unknown_type__u_n
mov rcx, rax
call sym.fprintf
jmp 0x1400058bd
mov ecx, 2
call qword [dbg.__acrt_iob_func]
lea rdx, str.____corrupt_record_n
mov rcx, rax
call sym.fprintf
jmp 0x140005ca8
xor r8d, r8d
xor edx, edx
lea rcx, [rbx + 0xc]
call sym.strtoul
cmp eax, 1
jbe 0x140005951
mov rcx, rbx
xor eax, eax
jmp 0x1400060de
cmp dl, 0xa
je 0x1400060eb
add rcx, 1
cmp eax, 0x61
je 0x140006155
movzx edx, byte [rcx]
mov r8d, eax
add eax, 1
test dl, dl
jne 0x1400060d0
mov edx, eax
movzx edx, byte [rbx + rdx]
cmp dl, 0x73
jne 0x140006101
lea edx, [r8 + 2]
mov rax, rdx
movzx edx, byte [rbx + rdx]
cmp dl, 0x3a
sete dl
movzx edx, dl
add eax, edx
cmp eax, 0x60
ja 0x140005951
lea rcx, [rbx + rax]
xor r8d, r8d
xor edx, edx
call sym.strtoul
mov rsi, qword [rsp + 0x58]
mov eax, eax
mov qword [rsi + 0x228], rax
jmp 0x140005951
mov ecx, 2
call qword [dbg.__acrt_iob_func]
lea rdx, str.file_corrupt_n
mov rcx, rax
call sym.fprintf
jmp 0x1400058bd
mov r8d, 0x61
mov edx, 0x62
mov eax, 0x62
jmp 0x1400060ed
mov ecx, 2
call qword [dbg.__acrt_iob_func]
lea rdx, str.read___error_n
mov rcx, rax
call sym.fprintf
mov ecx, 1
call sym.exit
nop
nop
nop
nop
nop