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

Disassembly:
push rsi
sub rsp, 0x150
mov eax, 0xffffffff
cmp r8, rax
cmovae r8, rax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x2c]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400f5e8a
mov dword [rsp + 0x30], 0xffffffff
cmp dword [rsp + 0x2c], 0xffffffff
jne 0x1400f5e84
lea r8, str.bytes_written___static_cast_DWORD___1_
lea rcx, [rsp + 0x2c]
lea rdx, [rsp + 0x30]
call fcn.1400f69a0
test rax, rax
je 0x1400f5e84
mov qword [rsp + 0x20], rax
lea rdx, str.FileOperationResult___cdecl_crashpad::internal::NativeWriteFile_FileHandle__const_void___size_t_
lea r8, str.third_party_crashpad_crashpad_util_file_file_io_win.cc
lea rsi, [rsp + 0x30]
mov rcx, rsi
mov r9d, 0x65
call fcn.1400f3a70
mov rcx, rsi
call fcn.1400f3c40
mov eax, dword [rsp + 0x2c]
jmp 0x1400f5e91
mov rax, 0xffffffffffffffff
add rsp, 0x150
pop rsi
ret
mov rcx, qword [rcx + 8]
jmp 0x1400f5e00

Function at 0x1400f5ea0
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x158
mov rsi, rdx
mov rdi, rcx
mov ebx, 0xffffffff
cmp r8, rbx
cmovb rbx, r8
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x34]
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400f5f8b
lea r14, str.bytes_read___static_cast_DWORD___1_
lea r15, [rsp + 0x34]
lea r12, [rsp + 0x38]
mov r13, qword [sym.imp.KERNEL32.dll_GetFileType]
mov rbp, qword [sym.imp.KERNEL32.dll_ReadFile]
nop word cs:[rax + rax]
mov dword [rsp + 0x38], 0xffffffff
mov eax, dword [rsp + 0x34]
cmp eax, 0xffffffff
jne 0x1400f5f61
mov rcx, r15
mov rdx, r12
mov r8, r14
call fcn.1400f69a0
test rax, rax
je 0x1400f5f5d
mov qword [rsp + 0x20], rax
mov rcx, r12
lea rdx, str.FileOperationResult___cdecl_crashpad::ReadFile_FileHandle__void___size_t_
lea r8, str.third_party_crashpad_crashpad_util_file_file_io_win.cc
mov r9d, 0x7e
call fcn.1400f3a70
mov rcx, r12
call fcn.1400f3c40
mov eax, dword [rsp + 0x34]
test eax, eax
jne 0x1400f5fa4
mov rcx, rdi
call r13
cmp eax, 3
jne 0x1400f5fa0
mov qword [rsp + 0x20], 0
mov rcx, rdi
mov rdx, rsi
mov r8d, ebx
mov r9, r15
call rbp
test eax, eax
jne 0x1400f5f10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
xor eax, eax
cmp ecx, 0x6d
setne al
neg rax
jmp 0x1400f5fa6
mov eax, dword [rsp + 0x34]
mov eax, eax
add rsp, 0x158
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x1400f6810
Capabilities:
Clear file content

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x160
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xd8], 0xfffffffffffffffe
mov rdi, rcx
xor esi, esi
xor edx, edx
xor r8d, r8d
call fcn.1400f6730
test rax, rax
jne 0x1400f68a2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov sil, 1
test eax, eax
jne 0x1400f68a2
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 2
lea rdx, str.bool___cdecl_crashpad::LoggingTruncateFile_FileHandle_
lea r8, str.third_party_crashpad_crashpad_util_file_file_io_win.cc
lea rsi, [rbp - 0x50]
mov rcx, rsi
mov r9d, 0xfb
call fcn.1400f3e50
lea rdx, [0x14019f9db]
mov r8d, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
mov rcx, rsi
call fcn.140013430
lea rcx, [rbp - 0x50]
call fcn.1400f3e80
xor esi, esi
mov eax, esi
add rsp, 0x160
pop rdi
pop rsi
pop rbp
ret

Function at 0x1400f7080
Capabilities:
Write file on windows

Disassembly:
push rsi
sub rsp, 0x150
mov eax, 0xffffffff
cmp r8, rax
cmovae r8, rax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x2c]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400f5e8a
mov dword [rsp + 0x30], 0xffffffff
cmp dword [rsp + 0x2c], 0xffffffff
jne 0x1400f5e84
lea r8, str.bytes_written___static_cast_DWORD___1_
lea rcx, [rsp + 0x2c]
lea rdx, [rsp + 0x30]
call fcn.1400f69a0
test rax, rax
je 0x1400f5e84
mov qword [rsp + 0x20], rax
lea rdx, str.FileOperationResult___cdecl_crashpad::internal::NativeWriteFile_FileHandle__const_void___size_t_
lea r8, str.third_party_crashpad_crashpad_util_file_file_io_win.cc
lea rsi, [rsp + 0x30]
mov rcx, rsi
mov r9d, 0x65
call fcn.1400f3a70
mov rcx, rsi
call fcn.1400f3c40
mov eax, dword [rsp + 0x2c]
jmp 0x1400f5e91
mov rax, 0xffffffffffffffff
add rsp, 0x150
pop rsi
ret
mov rcx, qword [rcx + 8]
jmp 0x1400f5e00
Function at 0x1400f7420
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x188
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x100], 0xfffffffffffffffe
mov ebx, edx
mov rsi, rcx
cmp byte [rcx + 0x17], 0
jns 0x1400f744c
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400f7471
test eax, 0x400
je 0x1400f7538
test bl, bl
jne 0x1400f7538
xor eax, eax
jmp 0x1400f753e
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 2
lea rdx, str.bool___cdecl_crashpad::IsDirectory_const_base::FilePath___bool_
lea r8, str.third_party_crashpad_crashpad_util_file_filesystem_win.cc
lea rdi, [rbp - 0x50]
mov rcx, rdi
mov r9d, 0x82
call fcn.1400f3e50
lea rdx, str.GetFileAttributes
mov r8d, 0x12
mov rcx, rdi
call fcn.140013430
mov rdi, rax
movzx eax, byte [rsi + 0x17]
test al, al
mov rcx, qword [rsi]
cmovns rcx, rsi
mov qword [rbp + 0xd8], rcx
cmovs rax, qword [rsi + 8]
mov qword [rbp + 0xe0], rax
lea rsi, [rbp + 0xe8]
lea rdx, [rbp + 0xd8]
mov rcx, rsi
call fcn.1400f24f0
movzx r8d, byte [rbp + 0xff]
test r8b, r8b
cmovs r8, qword [rbp + 0xf0]
cmovs rsi, qword [rbp + 0xe8]
mov rcx, rdi
mov rdx, rsi
call fcn.140013430
cmp byte [rbp + 0xff], 0
jns 0x1400f752b
mov rcx, qword [rbp + 0xe8]
call fcn.14010e7fc
lea rcx, [rbp - 0x50]
call fcn.1400f3e80
xor eax, eax
jmp 0x1400f753e
and eax, 0x10
shr eax, 4
add rsp, 0x188
pop rbx
pop rdi
pop rsi
pop rbp
ret

Function at 0x1400f75c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x190
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x108], 0xfffffffffffffffe
mov rsi, rcx
cmp byte [rcx + 0x17], 0
jns 0x1400f75e9
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400f7601
test eax, 0x410
sete al
jmp 0x1400f76c6
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 2
lea rdx, str.bool___cdecl_crashpad::IsRegularFile_const_base::FilePath__
lea r8, str.third_party_crashpad_crashpad_util_file_filesystem_win.cc
lea rdi, [rbp - 0x48]
mov rcx, rdi
mov r9d, 0x75
call fcn.1400f3e50
lea rdx, str.GetFileAttributes
mov r8d, 0x12
mov rcx, rdi
call fcn.140013430
mov rdi, rax
movzx eax, byte [rsi + 0x17]
test al, al
mov rcx, qword [rsi]
cmovns rcx, rsi
mov qword [rbp + 0xe0], rcx
cmovs rax, qword [rsi + 8]
mov qword [rbp + 0xe8], rax
lea rsi, [rbp + 0xf0]
lea rdx, [rbp + 0xe0]
mov rcx, rsi
call fcn.1400f24f0
movzx r8d, byte [rbp + 0x107]
test r8b, r8b
cmovs r8, qword [rbp + 0xf8]
cmovs rsi, qword [rbp + 0xf0]
mov rcx, rdi
mov rdx, rsi
call fcn.140013430
cmp byte [rbp + 0x107], 0
jns 0x1400f76bb
mov rcx, qword [rbp + 0xf0]
call fcn.14010e7fc
lea rcx, [rbp - 0x48]
call fcn.1400f3e80
xor eax, eax
add rsp, 0x190
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400f7750
Capabilities:
Check if file exists
Delete directory
Delete file

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x190
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x108], 0xfffffffffffffffe
mov rsi, rcx
cmp byte [rcx + 0x17], 0
jns 0x1400f7779
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400f77a2
and eax, 0x410
cmp eax, 0x410
jne 0x1400f77a2
mov rcx, rsi
add rsp, 0x190
pop rdi
pop rsi
pop rbp
jmp fcn.1400f7900
cmp byte [rsi + 0x17], 0
mov rcx, rsi
jns 0x1400f77ae
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, eax
mov al, 1
test ecx, ecx
jne 0x1400f7885
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 2
lea rdx, str.bool___cdecl_crashpad::LoggingRemoveFile_const_base::FilePath__
lea r8, str.third_party_crashpad_crashpad_util_file_filesystem_win.cc
lea rdi, [rbp - 0x48]
mov rcx, rdi
mov r9d, 0x95
call fcn.1400f3e50
lea rdx, str.DeleteFile
mov r8d, VariantTimeToDosDateTime
mov rcx, rdi
call fcn.140013430
mov rdi, rax
movzx eax, byte [rsi + 0x17]
test al, al
mov rcx, qword [rsi]
cmovns rcx, rsi
mov qword [rbp + 0xe0], rcx
cmovs rax, qword [rsi + 8]
mov qword [rbp + 0xe8], rax
lea rsi, [rbp + 0xf0]
lea rdx, [rbp + 0xe0]
mov rcx, rsi
call fcn.1400f24f0
movzx r8d, byte [rbp + 0x107]
test r8b, r8b
cmovs r8, qword [rbp + 0xf8]
cmovs rsi, qword [rbp + 0xf0]
mov rcx, rdi
mov rdx, rsi
call fcn.140013430
cmp byte [rbp + 0x107], 0
jns 0x1400f787a
mov rcx, qword [rbp + 0xf0]
call fcn.14010e7fc
lea rcx, [rbp - 0x48]
call fcn.1400f3e80
xor eax, eax
add rsp, 0x190
pop rdi
pop rsi
pop rbp
ret

Function at 0x1400f7900
Capabilities:
Delete directory

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x188
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x100], 0xfffffffffffffffe
mov rdi, rcx
cmp byte [rcx + 0x17], 0
jns 0x1400f792a
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov esi, eax
test eax, eax
jne 0x1400f79fd
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 2
lea rdx, str.bool___cdecl_crashpad::_anonymous_namespace_::LoggingRemoveDirectoryImpl_const_base::FilePath__
lea r8, str.third_party_crashpad_crashpad_util_file_filesystem_win.cc
lea rbx, [rbp - 0x50]
mov rcx, rbx
mov r9d, 0x30
call fcn.1400f3e50
lea rdx, str.RemoveDirectory
mov r8d, 0x10
mov rcx, rbx
call fcn.140013430
mov rbx, rax
movzx eax, byte [rdi + 0x17]
test al, al
mov rcx, qword [rdi]
cmovns rcx, rdi
mov qword [rbp + 0xd8], rcx
cmovs rax, qword [rdi + 8]
mov qword [rbp + 0xe0], rax
lea rdi, [rbp + 0xe8]
lea rdx, [rbp + 0xd8]
mov rcx, rdi
call fcn.1400f24f0
movzx r8d, byte [rbp + 0xff]
test r8b, r8b
cmovs r8, qword [rbp + 0xf0]
cmovs rdi, qword [rbp + 0xe8]
mov rcx, rbx
mov rdx, rdi
call fcn.140013430
cmp byte [rbp + 0xff], 0
jns 0x1400f79f4
mov rcx, qword [rbp + 0xe8]
call fcn.14010e7fc
lea rcx, [rbp - 0x50]
call fcn.1400f3e80
test esi, esi
setne al
add rsp, 0x188
pop rbx
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400fb440
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x158
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xd0], 0xfffffffffffffffe
test rdx, rdx
je 0x1400fb502
mov rsi, rdx
mov rdi, rcx
mov r14d, 0xffffffff
lea r15, [rbp - 0x50]
lea r12, str.Check_failed:_success
lea r13, [0x14018c872]
jmp 0x1400fb498
add rdi, rbx
sub rsi, rbx
je 0x1400fb502
cmp rsi, r14
mov ebx, 0xffffffff
cmovb rbx, rsi
mov rcx, rdi
mov edx, ebx
call sub.ADVAPI32.dll_SystemFunction036
test al, al
jne 0x1400fb490
mov dword [rsp + 0x20], 4
mov rcx, r15
lea rdx, str.void___cdecl_base::RandBytes_void___size_t_
lea r8, str.third_party_mini_chromium_mini_chromium_base_rand_util.cc
mov r9d, 0x7d
call fcn.1400f33f0
mov r8d, 0x15
mov rcx, r15
mov rdx, r12
call fcn.140013430
mov r8d, 2
mov rcx, rax
mov rdx, r13
call fcn.140013430
mov rcx, r15
call fcn.1400f3c40
jmp 0x1400fb490
add rsp, 0x158
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret

Function at 0x1401017a0
Capabilities:
Read file on windows

Disassembly:
push rsi
sub rsp, 0x20
mov rax, rdx
mov rsi, rcx
mov r9, qword [rcx + 8]
mov rcx, qword [rcx + 0x18]
cmp rcx, r8
cmovb r8, rcx
mov edx, 1
mov rcx, rax
call fcn.14012f2bc
sub qword [rsi + 0x18], rax
add rsp, 0x20
pop rsi
ret

Function at 0x14010ee68
Capabilities:
Parse pe header

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

Function at 0x1401234c8
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140123610
Function at 0x14012d908
Capabilities:
Get disk information

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x250
mov rax, qword [0x1401fcaa0]
xor rax, rsp
mov qword [rsp + 0x240], rax
lea rdx, [0x1401a9320]
mov rbp, rcx
call fcn.14013b764
xor edi, edi
test rax, rax
je 0x14012d9ee
mov ebx, edi
call fcn.1401265b4
mov r14d, dword [rax]
call fcn.1401265b4
mov r8d, 0x104
lea rcx, [rsp + 0x30]
mov rdx, rbp
mov dword [rax], edi
call fcn.1401425a8
mov rsi, rax
test rax, rax
je 0x14012d97f
call fcn.1401265b4
mov dword [rax], r14d
jmp 0x14012d9a9
call fcn.1401265b4
cmp dword [rax], 0x22
jne 0x14012d9e6
call fcn.1401265b4
xor r8d, r8d
mov rdx, rbp
xor ecx, ecx
mov dword [rax], r14d
call fcn.1401425a8
mov rbx, rax
mov rsi, rax
test rax, rax
je 0x14012d9e6
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], di
jne 0x14012d9ad
cmp rax, 3
je 0x14012d9c8
mov rcx, rsi
call fcn.14012d864
test al, al
je 0x14012d9d9
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x14012d9d9
mov dil, 1
mov rcx, rbx
call fcn.14012f53c
mov al, dil
jmp 0x14012d9f0
mov rcx, rbx
call fcn.14012f53c
xor al, al
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.14010f5d0
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
Function at 0x14012fb5c
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.14010eaf0
sub rsp, rax
mov rax, qword [0x1401fcaa0]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.140126d6c
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x14012fbab
mov rax, rbp
jmp 0x14012fcb3
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 + 0x213dd0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.1401415fc
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x213dd0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x14012fcaf
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 0x14012fcaf
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.1401415fc
test rax, rax
js 0x14012fcaf
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x14012fcaf
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x14012fca1
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x14012fca1
cmp byte [rcx], 0xd
jne 0x14012fc87
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x14012fc96
cmp byte [rcx + 1], 0xa
jne 0x14012fc96
inc rcx
jmp 0x14012fc96
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x1fdca0]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x14012fc69
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x14012fcb3
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.14010f5d0
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 0x140133420
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140133448
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140133448
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret

Function at 0x14013cf98
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.140136fb4
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x14013d039
cmp ebx, dword [rsp + 0x30]
je 0x14013d032
test esi, esi
je 0x14013d032
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x14013d00d
sub r8w, 0x61
cmp r8w, 0x19
ja 0x14013d01a
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x14013cff7
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x14013d01e
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x14013d03b
mov eax, 1
jmp 0x14013d03b
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14013dfa0
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x14013dfd0
xor eax, eax
jmp 0x14013e093
mov rbp, rbx
cmp word [rax], si
je 0x14013dff5
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14013dfdc
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14013dfd8
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.14013dec0
movsxd r14, eax
test eax, eax
jne 0x14013e033
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14013dfc9
mov rcx, r14
call fcn.1401394a0
mov rdi, rax
test rax, rax
jne 0x14013e04c
xor ecx, ecx
call fcn.140136678
jmp 0x14013e028
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.14013dec0
test eax, eax
jne 0x14013e07d
mov rcx, rdi
call fcn.140136678
jmp 0x14013e087
xor ecx, ecx
call fcn.140136678
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x14013e0b0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14013e137
mov rsi, rbx
cmp word [rax], bp
je 0x14013e0f6
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14013e0e0
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14013e0dc
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1401394a0
mov rdi, rax
test rax, rax
je 0x14013e124
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140111410
mov rbp, rdi
xor ecx, ecx
call fcn.140136678
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1401420c4
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x140213dd0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x14014211b
cmp word [rdx], r13w
jne 0x14014211b
or byte [rax + rdi*8 + 0x38], cl
jmp 0x140142120
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140142245
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x140142266
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140142159
mov rdx, r9
mov word [rbx], cx
jmp 0x140142180
cmp r9, r8
jae 0x140142190
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x14014213a
jmp 0x140142245
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14014223a
cmp dword [rsp + 0x80], esi
je 0x14014223a
lea r8, [0x140213dd0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x140142212
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1401421e2
mov word [rbx], r13w
jmp 0x140142242
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x1401421ef
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x140142242
cmp word [rsp + 0x70], r13w
jne 0x14014221f
cmp rbx, r14
je 0x1401421dc
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140141558
cmp word [rsp + 0x70], r13w
je 0x140142245
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x140213dd0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14014223f
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140142245
Function at 0x14014231c
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.140141558
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140141558
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14014246c
cmp rax, 0xffffffffffffffff
je 0x14014246c
xor edi, edi
test rbp, rbp
jle 0x140142417
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.140136600
mov rbx, rax
test rax, rax
jne 0x1401423a4
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14014240d
mov edx, 0x8000
mov ecx, r14d
call fcn.140128d6c
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.14012be40
cmp eax, 0xffffffff
je 0x1401423ed
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1401423b4
mov edx, r15d
mov ecx, r14d
call fcn.140128d6c
jmp 0x14014240d
cmp byte [rsi + 0x38], dil
je 0x140142404
cmp dword [rsi + 0x34], 5
jne 0x140142404
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14014240d
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140136678
jmp 0x140142480
jns 0x140142480
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140141558
cmp rax, 0xffffffffffffffff
jne 0x140142438
cmp byte [rsi + 0x30], dil
je 0x140142480
mov edi, dword [rsi + 0x2c]
jmp 0x140142480
mov ecx, r14d
call fcn.140126d94
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140142480
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x140142480
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140142479
mov eax, dword [rsi + 0x2c]
jmp 0x14014247e
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140141558
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x140143280
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140143296
mov al, 1
jmp 0x1401432f6
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1401432a7
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1401432f4
mov ecx, dword [rcx + 0x18]
nop
call fcn.140126d94
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1401432f4
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1401432f4
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1401432f4
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1401432f6
xor al, al
add rsp, 0x20
pop rbx
ret