joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000b3b0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.140011c40
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.140011c40
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x14000b420
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x1400a72b4]
mov r12, rcx
test ebx, ebx
jle 0x14000b550
mov rax, qword [0x1400a72b8]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x14000b46c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x14000b4f3
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x14000b450
mov rcx, r12
call fcn.14000bdc0
mov rsi, rax
test rax, rax
je 0x14000b572
mov rax, qword [0x1400a72b8]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.14000bef0
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1400a72b8]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000b557
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000b4ec
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14000b500
add dword [0x1400a72b4], 1
add rsp, 0x50
pop rbx
pop rsi
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rbx, qword [0x1400a72b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000b4ec
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14000b3b0
nop dword [rax]
xor ebx, ebx
jmp 0x14000b477
mov rax, qword [0x1400a72b8]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.14000b3b0
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.14000b3b0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x14000ba30
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x1400a7320]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400a7300]
test rbx, rbx
je 0x14000ba84
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x14000ba7b
test r12, r12
je 0x14000ba7b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14000ba60
lea rcx, [0x1400a7320]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x14000bdc0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400a44a0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14000bde0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14000bde8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000bde0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x14000be35
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14000be2c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14000bde0
add rax, 0x28
cmp rax, r9
jne 0x14000be18
xor eax, eax
ret

Function at 0x14000be40
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400a44a0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x14000be60
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x14000be68
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000be60
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x14000bef0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400a44a0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x14000bf10
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x14000bf18
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret
Function at 0x1400122c0
Capabilities:
Get file attributes
Write file on windows

Disassembly:
push r15
mov eax, 0x11d78
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14000c080
sub rsp, rax
mov rbx, rcx
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__time64]
mov rcx, rax
call sub.msvcrt.dll_srand
mov ecx, 0x3e8
call sub.msvcrt.dll_malloc
mov rcx, rax
mov r12, rax
call qword [sym.imp.msvcrt.dll__msize]
mov rcx, rbx
mov rsi, rax
call sub.msvcrt.dll_strlen
cmp eax, esi
jle 0x140012322
add eax, 0x64
mov rcx, r12
movsxd rdx, eax
call sub.msvcrt.dll_realloc
mov r12, rax
call sub.msvcrt.dll_rand
mov rcx, rbx
mov ebp, eax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
jne 0x140012351
add rsp, 0x11d78
mov rcx, r12
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sub.msvcrt.dll_free
mov eax, ebp
mov edi, 0x65
xor ebp, ebp
cdq
lea r13, str._sBocchi_find_you_i.jpg
lea r14, [0x140091db8]
idiv edi
lea r15, [rsp + 0x11d70]
mov dword [rsp + 0x24], edx
cmp ebp, dword [rsp + 0x24]
jge 0x140012336
mov r9d, ebp
mov r8, rbx
mov rdx, r13
mov rcx, r12
call fcn.1400123f0
mov rdx, r14
mov rcx, r12
call sub.msvcrt.dll_fopen
mov r9, rax
test rax, rax
je 0x1400123e6
lea rdi, [rsp + 0x3e]
lea rsi, [0x140091dbb]
mov ecx, 0x11d32
rep movsb byte [rdi], byte [rsi]
lea rsi, [rsp + 0x3e]
mov rcx, rsi
mov r8d, 1
mov edx, 1
inc rsi
mov qword [rsp + 0x28], r9
call sub.msvcrt.dll_fwrite
cmp rsi, r15
mov r9, qword [rsp + 0x28]
jne 0x1400123b9
mov rcx, r9
call sub.msvcrt.dll_fclose
inc ebp
jmp 0x140012377
Function at 0x6d7ec210
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6d80d5e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6d7ec398
mov rax, qword [0x6d80d5e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d7ec25c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d7ec2e5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d7ec240
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d7ec3cd
mov rax, qword [0x6d80d5e8]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x6d80d5e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d7ec3b0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d7ec2de
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d7ec340
add dword [0x6d80d5e4], 1
cmp edi, 8
jae 0x6d7ec313
test dil, 4
jne 0x6d7ec384
test edi, edi
je 0x6d7ec308
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d7ec39f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x6d7ec308
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x6d7ec32c
jmp 0x6d7ec308
add rsi, qword [0x6d80d5e8]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x6d7ec2de
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x6d7ec308
xor esi, esi
jmp 0x6d7ec267
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d7ec308
mov rax, qword [0x6d80d5e8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x6d7ecb20
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x6d80d8c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x6d80d8a0]
test rbx, rbx
je 0x6d7ecb74
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x6d7ecb6b
test rsi, rsi
je 0x6d7ecb6b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x6d7ecb50
lea rcx, [0x6d80d8c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x6d7ecdb0
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
je 0x6d7ecdc0
xor eax, eax
ret
jmp sym._ValidateImageBase.part.0

Function at 0x6d7ecdd0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x6d7ece11
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x6d7ece08
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6d7ece13
add rax, 0x28
cmp rax, r9
jne 0x6d7ecdf4
xor eax, eax
ret

Function at 0x6d7eceb0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d80a1f0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x6d7ecf1d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7ecf1d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x6d7ecf1d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x6d7ecf14
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d7ecf1f
add rax, 0x28
cmp rax, r9
jne 0x6d7ecf00
xor eax, eax
add rsp, 0x28
ret

Function at 0x6d7ed020
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d80a1f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6d7ed040
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7ed038
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x6d7ed09d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x6d7ed094
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d7ed0a4
add rax, 0x28
cmp rax, r9
jne 0x6d7ed080
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6d7ed0c0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6d80a1f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6d7ed12e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7ed12e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6d7ed12e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6d7ed12e
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x6d7ed125
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6d7ed135
add rcx, 0x28
cmp rcx, rax
jne 0x6d7ed110
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6d7ed148
jmp 0x6d7ed12e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6d7ed156
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6d7ed12e
test r9d, r9d
jg 0x6d7ed140
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6d7ed4b0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x1400031b0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push r14
sub rsp, 0x20
mov r14, r8
mov rsi, rdx
mov rbx, rcx
test r8, r8
jg 0x1400031e1
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
cmp qword [rcx + 0x68], 0
mov qword [rsp + 0x30], rbp
mov qword [rsp + 0x38], rdi
je 0x14000325b
mov rdi, r14
mov rcx, rbx
call fcn.1400054a0
test rax, rax
jle 0x140003233
cmp rdi, rax
mov rbp, rdi
mov rcx, rsi
cmovge rbp, rax
mov rax, qword [rbx + 0x38]
mov r8, rbp
mov rdx, qword [rax]
call fcn.14000cc90
mov rax, qword [rbx + 0x50]
sub rdi, rbp
sub dword [rax], ebp
mov rcx, qword [rbx + 0x38]
movsxd rax, ebp
add qword [rcx], rax
jmp 0x14000324b
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x38]
cmp eax, 0xffffffff
je 0x140003253
mov byte [rsi], al
dec rdi
mov ebp, 1
add rsi, rbp
test rdi, rdi
jg 0x1400031f5
sub r14, rdi
jmp 0x14000333f
mov rax, qword [rcx + 0x38]
mov rbp, r14
mov rdx, qword [rax]
test rdx, rdx
je 0x140003272
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140003274
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1400032a6
cmp rax, r14
mov rdi, r14
mov rcx, rsi
cmovb rdi, rax
mov r8, rdi
call fcn.14000cc90
mov rax, qword [rbx + 0x50]
add rsi, rdi
sub rbp, rdi
sub dword [rax], edi
mov rcx, qword [rbx + 0x38]
movsxd rax, edi
add qword [rcx], rax
cmp qword [rbx + 0x80], 0
je 0x14000333c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400032e1
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
cmp rbp, 0xfff
jbe 0x14000331d
nop word [rax + rax]
mov r9, qword [rbx + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, rsi
call fcn.1400141f4
add rsi, rax
sub rbp, rax
cmp rax, 0xfff
jne 0x14000333c
cmp rbp, rax
ja 0x1400032f0
test rbp, rbp
je 0x14000333c
mov r9, qword [rbx + 0x80]
mov r8, rbp
mov edx, 1
mov rcx, rsi
call fcn.1400141f4
sub rbp, rax
sub r14, rbp
mov rbp, qword [rsp + 0x30]
mov rax, r14
mov rdi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret

Function at 0x14000b570
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000b5ba
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000b5ba
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000b5ba
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000b5ba
cmp dword [rcx + 0x84], 0xe
jbe 0x14000b5ba
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14000b5bc
xor al, al
add rsp, 0x28
ret

Function at 0x14001af50
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14001ad40
Function at 0x140020c2c
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
mov rsi, rcx
test rcx, rcx
jne 0x140020c5e
call fcn.1400174b8
mov dword [rax], 0x16
call fcn.140011750
jmp 0x140020d7d
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x140020d7d
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x140020d7d
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x140020c8d
lock or dword [rcx + 0x14], 0x10
jmp 0x140020d7d
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x140020ca1
call fcn.140021528
mov rdi, qword [rsi + 8]
mov rcx, rsi
mov ebx, dword [rsi + 0x20]
mov qword [rsi], rdi
call fcn.14001f508
mov r8d, ebx
mov rdx, rdi
mov ecx, eax
call fcn.140021a40
mov dword [rsi + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 1
jbe 0x140020d6b
mov eax, dword [rsi + 0x14]
or edi, 0xffffffff
test al, 6
jne 0x140020d36
mov rcx, rsi
call fcn.14001f508
cmp eax, edi
je 0x140020d21
mov rcx, rsi
call fcn.14001f508
cmp eax, 0xfffffffe
je 0x140020d21
mov rcx, rsi
call fcn.14001f508
movsxd rbx, eax
lea r14, [0x1400a36b0]
mov rcx, rsi
sar rbx, 6
call fcn.14001f508
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rbx*8]
lea rdx, [rax + rcx*8]
jmp 0x140020d28
lea rdx, [0x14004b440]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x140020d36
lock or dword [rsi + 0x14], 0x20
cmp dword [rsi + 0x20], 0x200
jne 0x140020d5a
mov eax, dword [rsi + 0x14]
shr eax, 6
test al, 1
je 0x140020d5a
mov eax, dword [rsi + 0x14]
shr eax, 8
test al, 1
jne 0x140020d5a
mov dword [rsi + 0x20], 0x1000
mov rax, qword [rsi]
add dword [rsi + 0x10], edi
movzx edi, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x140020d80
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rsi + 0x14], eax
and dword [rsi + 0x10], 0
or edi, 0xffffffff
mov rbx, qword [rsp + 0x30]
mov eax, edi
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop r14
ret
Function at 0x1400212a8
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.14000b070
sub rsp, rax
mov rax, qword [0x14004b078]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14001f508
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x1400212f7
mov rax, rbp
jmp 0x1400213ff
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0xa36b0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.140022218
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0xa36b0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x1400213fb
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400213fb
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.140022218
test rax, rax
js 0x1400213fb
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x1400213fb
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x1400213ed
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x1400213ed
cmp byte [rcx], 0xd
jne 0x1400213d3
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x1400213e2
cmp byte [rcx + 1], 0xa
jne 0x1400213e2
inc rcx
jmp 0x1400213e2
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x4b490]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x1400213b5
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x1400213ff
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.14000b040
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140021594
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
movsxd rbp, ecx
mov r9, r8
mov rax, rbp
lea rcx, [0x1400a36b0]
and eax, 0x3f
mov r10, rbp
sar r10, 6
xor edi, edi
mov rsi, rdx
mov r14, rbp
lea r8, [rax + rax*8]
mov rax, qword [rcx + r10*8]
mov ecx, 4
mov qword [rsp + 0x78], rcx
mov r11, qword [rax + r8*8 + 0x28]
lea r12d, [rcx + 6]
test r9, r9
je 0x1400215f2
cmp word [rdx], r12w
jne 0x1400215f2
or byte [rax + r8*8 + 0x38], cl
jmp 0x1400215f8
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x140021753
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x14002172e
lea r9, [rcx + 2]
cmp ax, r13w
je 0x140021631
mov rcx, r9
jmp 0x140021654
cmp r9, rdx
jae 0x14002166b
cmp word [r9], r12w
mov eax, 2
cmove rax, qword [rsp + 0x78]
add rcx, rax
mov eax, r12d
cmp word [r9], r12w
cmovne ax, r13w
mov word [rbx], ax
mov r9d, 0x1a
add rbx, 2
cmp rcx, rdx
jb 0x140021615
jmp 0x140021753
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140021728
cmp dword [rsp + 0x80], edi
je 0x140021728
mov rdx, r14
lea r11, [0x1400a36b0]
sar rdx, 6
and r14d, 0x3f
mov rax, qword [r11 + rdx*8]
lea r8, [r14 + r14*8]
test byte [rax + r8*8 + 0x38], 0x48
je 0x140021701
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x1400216d4
mov word [rbx], r12w
jmp 0x14002174f
mov word [rbx], r13w
mov word [rsp + 0x78], ax
mov rax, qword [r11 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, 2
jl 0x1400216dd
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x14002174f
cmp word [rsp + 0x70], r12w
jne 0x14002170e
cmp rbx, rsi
je 0x1400216ce
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.140022220
cmp word [rsp + 0x70], r12w
je 0x140021753
mov word [rbx], r13w
jmp 0x14002174f
lea r11, [0x1400a36b0]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x14002174b
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x140021753
mov word [rbx], r9w
add rbx, 2
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret