joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403250
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbx
sub rsp, 0x70
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov rax, qword [0x0041e210]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rbx, rcx
call fcn.00405b90
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x38]
mov qword [rsp + 0x58], rax
mov word [rsp + 0x60], 0
mov word [rsp + 0x62], 0x20
mov byte [rsp + 0x38], 0
mov rdx, qword [rsp + 0x88]
test rdx, rdx
je 0x4032c5
lea r8, [rsp + 0x90]
lea rcx, [rsp + 0x30]
call fcn.00412950
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
test al, al
je 0x403310
mov edx, 0x1400003e
lea rcx, [rsp + 0x20]
call fcn.0040d510
mov rbx, rax
mov rcx, qword [rax]
mov r8, qword [rcx]
lea rdx, [rsp + 0x30]
call qword [r8 + 0x40]
mov rcx, rbx
call fcn.0040d6a0
nop
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x403310
mov rax, qword [rcx]
mov edx, 1
call qword [rax + 0x60]
cmp qword [rsp + 0x88], 0
je 0x403337
call qword [sym.imp.MSVCR80.dll___iob_func]
mov r8, qword [rsp + 0x58]
lea rdx, str.ERROR:__s._n_n
lea rcx, [rax + 0x60]
call qword [sym.imp.MSVCR80.dll_fprintf]
call qword [sym.imp.MSVCR80.dll___iob_func]
lea rdx, str.Firebird_Trace_utility._nUsage:_fbtracemgr__action____parameters___n_nActions:__n___STA_RT_______________________________Start_trace_session_n___STO_P________________________________Stop_trace_session_n___SU_SPEND_____________________________Suspend_trace_session_n___R_ESUME______________________________Resume_trace_session_n___L_IST________________________________List_existing_trace_sessions_n_nAction_parameters:__n___N_AME______string____________________Session_name_n___I_D________number____________________Session_ID_n___C_ONFIG____string____________________Trace_configuration_file_name_n_nConnection_parameters:__n___SE_RVICE____string___________________Service_name_n___U_SER_______string___________________User_name_n___P_ASSWORD___string___________________Password_n___FE_TCH______string___________________Fetch_password_from_file_n___T_RUSTED____string___________________Force_trusted_authentication_n_nExamples:__n__fbtracemgr__SE_remote_host:service_mgr__USER_SYSDBA__PASS_masterkey__LIST_n__fbtracemgr__SE_service_mgr__START__NAME_my_trace__CONFIG_my_cfg.txt_n__fbtracemgr__SE_service_mgr__SUSPEND__ID_2_n__fbtracemgr__SE_service_mgr__RESUME__ID_2_n__fbtracemgr__SE_service_mgr__STOP__ID_4_n_nNotes:_n__Press_CTRLC_to_stop_interactive_trace_session_n
lea rcx, [rax + 0x60]
call qword [sym.imp.MSVCR80.dll_fprintf]
mov ecx, 1
call qword [sym.imp.MSVCR80.dll_exit]
int3
Function at 0x4052c0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov ecx, dword [0x0041e290]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
jne 0x4052f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4052f0
lea rcx, [0x00417418]
call fcn.0040c4e0
mov rax, rbx
add rsp, 0x20
pop rbx
ret

Function at 0x40fb40
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x28
mov qword [rsp + 0x38], rbx
mov rbx, rdx
mov qword [rsp + 0x40], rsi
xor edx, edx
xor r8d, r8d
mov qword [rsp + 0x48], rdi
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
mov edi, eax
je 0x40fba0
lea edx, [rax - 1]
mov rcx, rbx
call fcn.00412780
mov rdx, qword [rbx + 0x28]
mov r8d, edi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp eax, edi
jae 0x40fba0
test eax, eax
je 0x40fba0
mov rdi, qword [rbx + 0x28]
xor eax, eax
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov al, 1
jmp 0x40fbb6
mov rax, qword [rbx + 0x28]
mov rcx, 0xffffffffffffffff
mov byte [rax], 0
mov rdi, qword [rbx + 0x28]
xor eax, eax
repne scasb al, byte [rdi]
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x40]
not rcx
sub rcx, 1
mov word [rbx + 0x30], cx
mov rbx, qword [rsp + 0x38]
add rsp, 0x28
ret

Function at 0x40fd30
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
sub rsp, 0x30
lea rax, [rcx + 0xc]
mov qword [rcx + 0x10], rdx
lea r9, [rcx + 8]
mov rcx, qword [rcx]
mov qword [rsp + 0x28], rax
xor ebx, ebx
xor r8d, r8d
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
sete al
add rsp, 0x30
pop rbx
ret

Function at 0x40fd70
Capabilities:
Query or enumerate registry value

Disassembly:
sub rsp, 0x38
lea rax, [rcx + 0xc]
lea r9, [rcx + 8]
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
mov rdx, qword [rcx + 0x10]
mov rcx, qword [rcx]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
sete al
add rsp, 0x38
ret
Function at 0x4148d7
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x0041e210]
jne 0x41414a
rol rcx, 0x10
test cx, 0xffff
jne 0x414146
repz ret
ror rcx, 0x10
jmp 0x414830
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x0041e4e0]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rax, qword [0x0041e5d8]
mov qword [rsp + 0x58], rax
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x4148b5
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x0041e4e0]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x4148d7
mov rax, qword [rsp + 0x88]
mov qword [0x0041e5d8], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x0041e578], rax
mov rax, qword [0x0041e5d8]
mov qword [0x0041e450], rax
mov rax, qword [rsp + 0x90]
mov qword [0x0041e560], rax
mov dword [0x0041e440], 0xc0000409
mov dword [0x0041e444], 1
mov rax, qword [0x0041e210]
mov qword [rsp + 0x68], rax
mov rax, qword [0x0041e218]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x0041e4d8], eax
mov ecx, 1
call sub.MSVCR80.dll___crt_debugger_hook
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x00418ab0]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x0041e4d8], 0
jne 0x41495e
mov ecx, 1
call sub.MSVCR80.dll___crt_debugger_hook
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret
Function at 0x140001d00
Capabilities:
Encode data using xor
Encrypt data using tea

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov r15, rdx
mov rbx, rcx
mov dword [rsp + 0x20], 0
mov rdx, r8
lea rcx, [rsp + 0x40]
call fcn.140004050
mov rdx, rax
lea rcx, [rsp + 0x28]
call fcn.140004c90
nop
mov rsi, qword [r15]
mov rcx, qword [r15 + 8]
cmp rsi, rcx
je 0x140001e66
sub rcx, rsi
sar rcx, 2
mov ebp, dword [rsi]
xor edx, edx
mov eax, 0x34
div rcx
add eax, 6
imul r14d, eax, 0x9e3779b9
test r14d, r14d
je 0x140001e66
lea r12, [rcx - 1]
mov rdi, rsi
lea r13, [rcx*4]
nop word [rax + rax]
mov r10, r12
mov r11d, r14d
shr r11, 2
and r11d, 3
test r12, r12
je 0x140001e0a
nop dword [rax]
nop word [rax + rax]
mov r9d, dword [rdi + r10*4 - 4]
mov rcx, r10
and ecx, 3
xor rcx, r11
mov rax, qword [rsp + 0x28]
lea rdx, [rax + rcx*4]
lea r8d, [rbp*4]
mov eax, r9d
shr eax, 5
xor r8d, eax
mov ecx, ebp
shr ecx, 3
mov eax, r9d
shl eax, 4
xor ecx, eax
add r8d, ecx
xor r9d, dword [rdx]
mov eax, r14d
xor eax, ebp
add r9d, eax
xor r8d, r9d
sub dword [rdi + r10*4], r8d
mov rdi, qword [r15]
mov ebp, dword [rdi + r10*4]
sub r10, 1
jne 0x140001db0
mov rsi, rdi
mov r9d, dword [rsi + r13 - 4]
and r10d, 3
xor r10, r11
mov rax, qword [rsp + 0x28]
lea rdx, [rax + r10*4]
lea r8d, [rbp*4]
mov eax, r9d
shr eax, 5
xor r8d, eax
mov ecx, ebp
shr ecx, 3
mov eax, r9d
shl eax, 4
xor ecx, eax
add r8d, ecx
xor r9d, dword [rdx]
mov eax, r14d
xor eax, ebp
add r9d, eax
xor r8d, r9d
sub dword [rsi], r8d
mov rdi, qword [r15]
mov ebp, dword [rdi]
add r14d, 0x61c88647
mov rsi, rdi
jne 0x140001d90
mov qword [rbx], 0
mov qword [rbx + 0x10], 0
mov qword [rbx + 0x18], 0xf
mov byte [rbx], 0
mov dword [rsp + 0x20], 2
mov rax, qword [r15 + 8]
sub rax, qword [r15]
sar rax, 2
lea rdx, [rax*4]
cmp rdx, 0xf
jbe 0x140001eb1
mov rcx, rbx
call fcn.140009970
mov qword [rbx + 0x10], 0
mov rbp, qword [r15 + 8]
mov rsi, qword [r15]
cmp rsi, rbp
je 0x140001f1d
nop dword [rax]
xor edi, edi
mov rcx, rdi
and ecx, 3
shl rcx, 3
mov eax, dword [rsi]
shr eax, cl
cmp al, 3
je 0x140001f14
mov rdx, qword [rbx + 0x10]
mov r8, qword [rbx + 0x18]
cmp rdx, r8
jae 0x140001eff
lea rcx, [rdx + 1]
mov qword [rbx + 0x10], rcx
mov rcx, rbx
cmp r8, 0x10
jb 0x140001ef5
mov rcx, qword [rbx]
mov byte [rcx + rdx], al
mov byte [rcx + rdx + 1], 0
jmp 0x140001f0b
movzx r9d, al
mov rcx, rbx
call fcn.140004f30
inc rdi
cmp rdi, 4
jb 0x140001ec2
add rsi, 4
cmp rsi, rbp
jne 0x140001ec0
mov rcx, qword [rsp + 0x28]
test rcx, rcx
je 0x140001f59
mov rdx, qword [rsp + 0x38]
sub rdx, rcx
and rdx, 0xfffffffffffffffc
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001f54
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140001f74
call fcn.14000ba74
mov rax, rbx
mov rbx, qword [rsp + 0xb0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.1400195a0
int3
Function at 0x14001df3c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14001dd2c
Function at 0x14002351c
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 0x14002354e
call fcn.14001854c
mov dword [rax], 0x16
call fcn.140019580
jmp 0x14002366d
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x14002366d
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x14002366d
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x14002357d
lock or dword [rcx + 0x14], 0x10
jmp 0x14002366d
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x140023591
call fcn.140025aac
mov rdi, qword [rsi + 8]
mov rcx, rsi
mov ebx, dword [rsi + 0x20]
mov qword [rsi], rdi
call fcn.14002090c
mov r8d, ebx
mov rdx, rdi
mov ecx, eax
call fcn.140025fc4
mov dword [rsi + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 1
jbe 0x14002365b
mov eax, dword [rsi + 0x14]
or edi, 0xffffffff
test al, 6
jne 0x140023626
mov rcx, rsi
call fcn.14002090c
cmp eax, edi
je 0x140023611
mov rcx, rsi
call fcn.14002090c
cmp eax, 0xfffffffe
je 0x140023611
mov rcx, rsi
call fcn.14002090c
movsxd rbx, eax
lea r14, [0x14004a1e0]
mov rcx, rsi
sar rbx, 6
call fcn.14002090c
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rbx*8]
lea rdx, [rax + rcx*8]
jmp 0x140023618
lea rdx, [0x140048410]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x140023626
lock or dword [rsi + 0x14], 0x20
cmp dword [rsi + 0x20], 0x200
jne 0x14002364a
mov eax, dword [rsi + 0x14]
shr eax, 6
test al, 1
je 0x14002364a
mov eax, dword [rsi + 0x14]
shr eax, 8
test al, 1
jne 0x14002364a
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 0x140023670
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 0x140024c9c
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.14000c070
sub rsp, rax
mov rax, qword [0x140048068]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14002090c
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140024ceb
mov rax, rbp
jmp 0x140024df3
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 + 0x4a1e0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.14002679c
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x4a1e0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140024def
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 0x140024def
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.14002679c
test rax, rax
js 0x140024def
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140024def
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140024de1
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140024de1
cmp byte [rcx], 0xd
jne 0x140024dc7
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x140024dd6
cmp byte [rcx + 1], 0xa
jne 0x140024dd6
inc rcx
jmp 0x140024dd6
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x48460]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x140024da9
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x140024df3
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.14000c040
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 0x140025b18
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, [0x14004a1e0]
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 0x140025b76
cmp word [rdx], r12w
jne 0x140025b76
or byte [rax + r8*8 + 0x38], cl
jmp 0x140025b7c
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x140025cd7
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x140025cb2
lea r9, [rcx + 2]
cmp ax, r13w
je 0x140025bb5
mov rcx, r9
jmp 0x140025bd8
cmp r9, rdx
jae 0x140025bef
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 0x140025b99
jmp 0x140025cd7
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 0x140025cac
cmp dword [rsp + 0x80], edi
je 0x140025cac
mov rdx, r14
lea r11, [0x14004a1e0]
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 0x140025c85
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x140025c58
mov word [rbx], r12w
jmp 0x140025cd3
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 0x140025c61
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x140025cd3
cmp word [rsp + 0x70], r12w
jne 0x140025c92
cmp rbx, rsi
je 0x140025c52
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.1400267a4
cmp word [rsp + 0x70], r12w
je 0x140025cd7
mov word [rbx], r13w
jmp 0x140025cd3
lea r11, [0x14004a1e0]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x140025ccf
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x140025cd7
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
Function at 0x140029e48
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 0x140029e78
xor eax, eax
jmp 0x140029f3b
mov rbp, rbx
cmp word [rax], si
je 0x140029e9d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140029e84
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140029e80
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.140028474
movsxd r14, eax
test eax, eax
jne 0x140029edb
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140029e71
mov rcx, r14
call fcn.140023688
mov rdi, rax
test rax, rax
jne 0x140029ef4
xor ecx, ecx
call fcn.140021790
jmp 0x140029ed0
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.140028474
test eax, eax
jne 0x140029f25
mov rcx, rdi
call fcn.140021790
jmp 0x140029f2f
xor ecx, ecx
call fcn.140021790
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 0x140030ee4
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.140012cb0
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140030f6e
cmp byte [rbp - 0x21], r15b
je 0x140030f69
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140030fa4
call fcn.140021a94
test eax, eax
jne 0x140030f90
cmp byte [rbp - 0x21], r15b
je 0x140030f88
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140030fa4
cmp byte [rbp - 0x21], r15b
je 0x140030fa1
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.14001cbe8
test eax, eax
jne 0x140031044
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140012cb0
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140030fe3
cmp byte [rbp - 0x21], r15b
je 0x140031018
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140031018
call fcn.140021a94
test eax, eax
jne 0x140031004
cmp byte [rbp - 0x21], r15b
je 0x140030ffd
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140031018
cmp byte [rbp - 0x21], r15b
je 0x140031015
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.14001cbe8
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140031044
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140031047
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140031055
mov rcx, rdi
call fcn.140021790
cmp byte [rbp + 0x3f], r15b
je 0x140031064
mov rcx, qword [rbp + 0x27]
call fcn.140021790
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x140031e54
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.1400267a4
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1400267a4
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140031fa4
cmp rax, 0xffffffffffffffff
je 0x140031fa4
xor edi, edi
test rbp, rbp
jle 0x140031f4f
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1400214b8
mov rbx, rax
test rax, rax
jne 0x140031edc
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140031f45
mov edx, 0x8000
mov ecx, r14d
call fcn.14001dfb8
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.140022e08
cmp eax, 0xffffffff
je 0x140031f25
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140031eec
mov edx, r15d
mov ecx, r14d
call fcn.14001dfb8
jmp 0x140031f45
cmp byte [rsi + 0x38], dil
je 0x140031f3c
cmp dword [rsi + 0x34], 5
jne 0x140031f3c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140031f45
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140021790
jmp 0x140031fb8
jns 0x140031fb8
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1400267a4
cmp rax, 0xffffffffffffffff
jne 0x140031f70
cmp byte [rsi + 0x30], dil
je 0x140031fb8
mov edi, dword [rsi + 0x2c]
jmp 0x140031fb8
mov ecx, r14d
call fcn.14002a888
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140031fb8
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 0x140031fb8
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140031fb1
mov eax, dword [rsi + 0x2c]
jmp 0x140031fb6
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1400267a4
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 0x140001df0
Capabilities:
Write file on windows

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x80
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov esi, 0xffff
movzx edi, dx
mov rbx, rcx
cmp si, dx
jne 0x140001e21
xor eax, eax
jmp 0x140001f6b
mov rax, qword [rcx + 0x40]
mov r8, qword [rax]
test r8, r8
je 0x140001e5e
mov r9, qword [rcx + 0x58]
movsxd r10, dword [r9]
lea rdx, [r8 + r10*2]
cmp r8, rdx
jae 0x140001e5e
lea ecx, [r10 - 1]
movzx eax, di
mov dword [r9], ecx
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 2]
mov qword [rdx], rcx
mov word [r8], di
jmp 0x140001f6b
cmp qword [rcx + 0x80], 0
mov qword [rsp + 0xb0], rbp
je 0x140001f60
mov r8, qword [rcx + 0x18]
lea rax, [rcx + 0x70]
cmp qword [r8], rax
jne 0x140001ea5
mov rdx, qword [rcx + 0x90]
mov rcx, qword [rcx + 0x88]
mov qword [r8], rcx
sub rdx, rcx
mov rax, qword [rbx + 0x38]
sar rdx, 1
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140001eb3
movzx ecx, di
jmp 0x140001f07
lea rax, [rsp + 0x40]
mov word [rsp + 0x50], di
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x52]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_wchar_t__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__wchar_t_const____ptr64__wchar_t_const____ptr64__wchar_t_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140001f20
sub eax, 1
je 0x140001f20
cmp eax, 2
jne 0x140001f60
movzx ecx, word [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputwc]
cmp ax, si
cmove di, si
movzx eax, di
jmp 0x140001f63
mov rbp, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rbp, rax
je 0x140001f4e
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rbp
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rbp, rax
jne 0x140001f60
lea rax, [rsp + 0x50]
mov byte [rbx + 0x72], 1
cmp qword [rsp + 0x48], rax
cmovne si, di
movzx eax, si
mov rbp, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140002c20
add rsp, 0x80
pop rdi
pop rsi
pop rbx
ret