joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001aae4
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, [0x14004ca30]
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 0x14001ab3b
cmp word [rdx], r13w
jne 0x14001ab3b
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14001ab40
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x14001ac65
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14001ac86
lea r9, [rdx + 2]
cmp cx, r11w
je 0x14001ab79
mov rdx, r9
mov word [rbx], cx
jmp 0x14001aba0
cmp r9, r8
jae 0x14001abb0
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 0x14001ab5a
jmp 0x14001ac65
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 0x14001ac5a
cmp dword [rsp + 0x80], esi
je 0x14001ac5a
lea r8, [0x14004ca30]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14001ac32
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14001ac02
mov word [rbx], r13w
jmp 0x14001ac62
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 0x14001ac0f
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14001ac62
cmp word [rsp + 0x70], r13w
jne 0x14001ac3f
cmp rbx, r14
je 0x14001abfc
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.14001b8b4
cmp word [rsp + 0x70], r13w
je 0x14001ac65
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, [0x14004ca30]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14001ac5f
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x14001ac65
Function at 0x14001c990
Capabilities:
Get file size

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

Function at 0x14001f08c
Capabilities:
Get disk information

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x14003d018]
xor rax, rsp
mov qword [rsp + 0x28], rax
cmp ecx, 0x1a
jbe 0x14001f0d6
call fcn.140016068
mov dword [rax], 0xf
call fcn.140016088
mov dword [rax], 0xd
call fcn.140019f10
xor eax, eax
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.14000a100
add rsp, 0x30
pop rbx
ret
xor ebx, ebx
test ecx, ecx
jne 0x14001f0e1
lea eax, [rbx + 1]
jmp 0x14001f0c3
add cx, 0x40
mov dword [rsp + 0x22], 0x5c003a
mov word [rsp + 0x20], cx
lea rcx, [rsp + 0x20]
mov word [rsp + 0x26], bx
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x14001f0c1
cmp eax, 1
setne bl
mov eax, ebx
jmp 0x14001f0c3
Function at 0x140021aec
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 0x140021b1c
xor eax, eax
jmp 0x140021bdf
mov rbp, rbx
cmp word [rax], si
je 0x140021b41
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140021b28
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140021b24
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.14001f138
movsxd r14, eax
test eax, eax
jne 0x140021b7f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140021b15
mov rcx, r14
call fcn.14001cc2c
mov rdi, rax
test rax, rax
jne 0x140021b98
xor ecx, ecx
call fcn.140019f78
jmp 0x140021b74
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.14001f138
test eax, eax
jne 0x140021bc9
mov rcx, rdi
call fcn.140019f78
jmp 0x140021bd3
xor ecx, ecx
call fcn.140019f78
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 0x140021bfc
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 0x140021c83
mov rsi, rbx
cmp word [rax], bp
je 0x140021c42
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140021c2c
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140021c28
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14001cc2c
mov rdi, rax
test rax, rax
je 0x140021c70
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14000aec0
mov rbp, rdi
xor ecx, ecx
call fcn.140019f78
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 0x140026644
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.140014a84
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400266ce
cmp byte [rbp - 0x21], r15b
je 0x1400266c9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140026704
call fcn.14001e144
test eax, eax
jne 0x1400266f0
cmp byte [rbp - 0x21], r15b
je 0x1400266e8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140026704
cmp byte [rbp - 0x21], r15b
je 0x140026701
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.14001456c
test eax, eax
jne 0x1400267a4
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140014a84
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140026743
cmp byte [rbp - 0x21], r15b
je 0x140026778
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140026778
call fcn.14001e144
test eax, eax
jne 0x140026764
cmp byte [rbp - 0x21], r15b
je 0x14002675d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140026778
cmp byte [rbp - 0x21], r15b
je 0x140026775
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.14001456c
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400267a4
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400267a7
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400267b5
mov rcx, rdi
call fcn.140019f78
cmp byte [rbp + 0x3f], r15b
je 0x1400267c4
mov rcx, qword [rbp + 0x27]
call fcn.140019f78
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 0x140027e30
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.14001b8b4
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001b8b4
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140027f80
cmp rax, 0xffffffffffffffff
je 0x140027f80
xor edi, edi
test rbp, rbp
jle 0x140027f2b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14001deb8
mov rbx, rax
test rax, rax
jne 0x140027eb8
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140027f21
mov edx, 0x8000
mov ecx, r14d
call fcn.140015968
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.14001c590
cmp eax, 0xffffffff
je 0x140027f01
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140027ec8
mov edx, r15d
mov ecx, r14d
call fcn.140015968
jmp 0x140027f21
cmp byte [rsi + 0x38], dil
je 0x140027f18
cmp dword [rsi + 0x34], 5
jne 0x140027f18
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140027f21
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140019f78
jmp 0x140027f94
jns 0x140027f94
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001b8b4
cmp rax, 0xffffffffffffffff
jne 0x140027f4c
cmp byte [rsi + 0x30], dil
je 0x140027f94
mov edi, dword [rsi + 0x2c]
jmp 0x140027f94
mov ecx, r14d
call fcn.14001705c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140027f94
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 0x140027f94
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140027f8d
mov eax, dword [rsi + 0x2c]
jmp 0x140027f92
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001b8b4
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 0x14000c3da
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x28
lea rcx, [0x14000ed81]
call sub.msvcrt.dll_getenv
jmp 0x14000c56f
lea rcx, [0x14000ed85]
lea rdx, [0x14000ed7d]
mov r8, rax
mov rax, qword [0x14000ef5f]
call rax
mov rsi, rax
lea rdi, [0x14000ed85]
lea r12, [0x14000c887]
push r12
push r14
push rbx
push rbp
mov rbp, rsp
sub rsp, 0xd0
cmp r11, r10
je 0x14000c5b4
mov dword [rbp - 0x7f], eax
mov eax, eax
mov r11, rcx
cmp rdx, qword [0x14000e002]
jne 0x14000c5eb
movzx ecx, al
mov r8, qword [rbp - 0xc5]
mov r10, rbx
mov rcx, rdx
mov r10, qword [rbp - 0x15]
mov qword [rbp - 0x92], rbx
mov ebx, dword [rbp - 0x5b]
mov r9, rcx
mov r11, qword [0x14000e005]
mov dword [rbp - 0x43], ecx
mov dword [rbp - 0x78], ebx
mov edx, dword [rbp - 0x7d]
mov edx, dword [rbp - 0xa7]
cmp ecx, dword [section..data]
jno 0x14000c5ff
movzx ecx, ah
sub rcx, r11
mov edx, 0x2503
or ebx, dword [rbp - 0x7d]
mov dword [rbp - 0xc5], edx
mov dword [rbp - 0x66], eax
sub ch, 0x10
mov r11, r11
mov qword [rbp - 0xbb], r11
sub rdx, qword [rbp - 0x6c]
cmp ecx, dword [0x14000e00d]
jne 0x14000c636
mov rbx, qword [rbp - 0xcb]
mov r11, 0x24d8
mov ecx, ebx
mov r14, qword [rbp - 0x70]
cmp eax, dword [0x14000e003]
je 0x14000c67b
mov rcx, rdx
mov r11, qword [rbp - 6]
call fcn.14000c70b
and dword [rbp - 0x9e], ecx
mov ebx, 0xd521
mov dword [rbp - 0x6e], ecx
movzx eax, ah
sub ecx, ebx
sub dword [rbp - 0x8e], eax
add ebx, dword [rbp - 0x8c]
add edx, edx
mov r9, r10
xor dword [rbp - 0x9b], edx
add r11, 0xcc15
sub ebx, dword [0x14000e00a]
mov qword [rbp - 0x8a], rax
lea r9, [rbp - 0x77]
mov r10, r8
xor eax, dword [rbp - 0x36]
mov qword [rbp - 0x5a], r11
cmp eax, dword [0x14000e00f]
jne 0x14000c6e9
mov dx, 0xe480
mov r10, 0xfd1e
mov dword [rbp - 0x6a], ebx
add rbx, rcx
xor rdx, rbx
movzx ecx, al
movzx ecx, word [rbp - 0x6e]
sub ecx, ebx
mov qword [rbp - 0x60], r9
or ecx, ecx
mov eax, dword [section..data]
mov dword [rbp - 0x1f], ecx
mov byte [rbp - 0x2a], ch
or rdx, r11
sub r14, 0x1e42
mov eax, 0x3430
add dword [rbp - 0xc5], edx
cmp ecx, 0xab614219
jo 0x14000c706
and qword [rbp - 0x20], r9
sub r9, qword [0x14000e00c]
sub qword [rbp - 0x3c], rbx
leave
pop rbx
pop r14
ret
Function at 0x14000284c
Capabilities:
Check if file exists

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 - 0x168]
sub rsp, 0x250
mov rax, qword [0x1400128b8]
xor rax, rsp
mov qword [rbp + 0x140], rax
xor r15d, r15d
lea rax, [rsp + 0x30]
mov qword [r8], r15
lea rdx, [rsp + 0x30]
sub rcx, rax
mov r14, r8
mov r9d, 0x104
lea rax, [r9 + 0x7ffffefa]
test rax, rax
je 0x1400028bd
movzx eax, word [rcx + rdx]
test ax, ax
je 0x1400028bd
mov word [rdx], ax
add rdx, 2
sub r9, 1
jne 0x14000289b
test r9, r9
lea rax, [rdx - 2]
lea r8, [0x14000a4b8]
cmovne rax, rdx
lea rcx, [rsp + 0x30]
mov word [rax], r15w
call fcn.1400011bc
mov ebx, 0x1f0003
lea r8, [rsp + 0x30]
mov ecx, ebx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
mov rdi, rax
test rax, rax
jne 0x140002927
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x1400029f4
mov edx, 0xc8
mov rcx, qword [rbp + 0x168]
lea r8, [0x14000a468]
call fcn.14000264c
mov esi, eax
jmp 0x1400029f7
lea rdx, [rsp + 0x24]
mov dword [rsp + 0x24], r15d
mov rcx, rdi
mov dword [rsp + 0x20], r15d
call fcn.140002700
mov esi, eax
test eax, eax
jns 0x140002964
mov rcx, qword [rbp + 0x168]
lea r8, [0x14000a468]
mov r9d, eax
mov edx, 0xce
call fcn.14000261c
jmp 0x1400029f7
lea r8, [0x14000a4c0]
lea rcx, [rsp + 0x30]
call fcn.1400011bc
lea r8, [rsp + 0x30]
xor edx, edx
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
mov rbx, rax
test rax, rax
jne 0x140002996
mov edx, 0xd4
jmp 0x14000290d
lea rdx, [rsp + 0x20]
mov rcx, rbx
call fcn.140002700
mov esi, eax
test eax, eax
jns 0x1400029d3
mov rcx, qword [rbp + 0x168]
lea r8, [0x14000a468]
mov r9d, eax
mov edx, 0xd6
call fcn.14000261c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x1400029f7
jmp 0x140002a37
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x140002a49
movsxd rcx, dword [rsp + 0x20]
movsxd rax, dword [rsp + 0x24]
shl rcx, 0x1f
or rax, rcx
mov qword [r14], rax
mov esi, r15d
test rdi, rdi
je 0x140002a09
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x140002a5b
mov eax, esi
mov rcx, qword [rbp + 0x140]
xor rcx, rsp
call fcn.1400050e0
lea r11, [rsp + 0x250]
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
mov rcx, qword [rbp + 0x168]
mov edx, 0x875
call fcn.140002664
int3
mov rcx, qword [rbp + 0x168]
mov edx, 0x875
call fcn.140002664
int3
mov rcx, qword [rbp + 0x168]
mov edx, 0x875
call fcn.140002664
int3
Function at 0x1400047e4
Capabilities:
Identify system language via api

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x60
mov rax, qword [0x1400128b8]
xor rax, rsp
mov qword [rsp + 0x58], rax
lea r14, str.en_US
mov rsi, rcx
mov qword [rcx], r14
call qword [sym.imp.KERNEL32.dll_GetSystemDefaultUILanguage]
mov word [rsp + 0x30], ax
mov ebx, 0x10
mov r9d, ebx
lea rdx, [0x140008110]
lea rax, [0x140004df0]
mov r8d, 0x1b3
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x20], rax
call sub.api_ms_win_crt_private_l1_1_0.dll__o_bsearch
xor ebp, ebp
test rax, rax
jne 0x14000485f
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400048e5
cmp dword [rax + 0xc], 0x7c
jne 0x14000486c
cmp word [rax + 8], 0x7f
jne 0x14000484f
mov r8, qword [rax]
or rcx, 0xffffffffffffffff
inc rcx
cmp word [r8 + rcx*2], bp
jne 0x140004873
inc rcx
cmp rcx, 0x7ffffffe
jbe 0x140004890
mov word [rsp + 0x38], bp
jmp 0x1400048d7
lea rax, [rsp + 0x38]
mov r9d, ebp
sub r8, rax
lea rdx, [rsp + 0x38]
lea rax, [rbx - 0x10]
add rax, rcx
je 0x1400048c0
movzx eax, word [r8 + rdx]
test ax, ax
je 0x1400048c0
mov word [rdx], ax
add rdx, 2
sub rbx, 1
jne 0x1400048a0
test rbx, rbx
jne 0x1400048cf
sub rdx, 2
mov r9d, 0x8007007a
mov word [rdx], bp
test r9d, r9d
jns 0x1400048e1
mov ecx, 0x7a
jmp 0x140004854
test ecx, ecx
jne 0x1400048f1
mov rcx, qword [rsp + 0x78]
call fcn.14000494c
jmp 0x14000492a
mov rbx, rbp
mov rdi, rbp
mov rdx, qword [rdi + r14]
lea rcx, [rsp + 0x38]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
test eax, eax
je 0x14000491c
inc rbx
add rdi, 0x30
cmp rdi, 0x750
jb 0x1400048f7
jmp 0x14000492a
lea rax, [rbx + rbx*2]
shl rax, 4
add rax, r14
mov qword [rsi], rax
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400050e0
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret

Function at 0x140005104
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x140012e60], eax
call fcn.1400056f0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x140012e60], 0
jne case.default.0x14000515a
mov ecx, 1
call fcn.1400056f0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.KERNEL32.dll_TerminateProcess]
invalid
je 0x14001ad0a
and dword [rcx - 0x1a9f9f7], 0x6725def
xor ebx, ecx
invalid
jg 0x14001acdd
xchg ecx, eax
ret
Function at 0x1400011e0
Capabilities:
Start service

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
mov edi, ecx
mov rbx, rdx
lea rcx, [0x140003da0]
call fcn.1400187d0
call fcn.140003a50
call fcn.140001110
lea rcx, [0x14005aad0]
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x140001308
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x427
jne 0x1400013db
mov qword [rsp + 0x30], rsi
cmp edi, 2
jne 0x140001384
mov rcx, qword [rbx + 8]
lea r8d, [rdi + 2]
lea rdx, str._ddd
call fcn.1400194e4
xor edi, edi
lea rsi, str.ssh_agent
test eax, eax
jne 0x140001266
mov dword [0x14005acf4], 7
jmp 0x1400012b0
mov rcx, qword [rbx + 8]
lea rdx, [0x140037ac8]
mov r8d, 3
call fcn.1400194e4
test eax, eax
jne 0x14000128c
mov dword [0x14005acf4], 6
jmp 0x1400012b0
mov rcx, qword [rbx + 8]
lea rdx, [0x140037ad0]
mov r8d, 2
call fcn.1400194e4
test eax, eax
jne 0x1400012cf
mov dword [0x14005acf4], 5
mov qword [0x14006c2a8], rsi
mov qword [0x14006cb38], rdi
mov qword [0x14006cb30], rdi
mov dword [0x14005ab8c], 1
mov rcx, qword [rbx + 8]
lea rdx, [0x140037ad0]
mov r8d, 2
call fcn.1400194e4
test eax, eax
jne 0x140001315
lea edx, [rax + 1]
lea rcx, [0x1400010f0]
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
mov ecx, 1
call fcn.140001a30
mov rsi, qword [rsp + 0x30]
xor eax, eax
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov rcx, qword [rbx + 8]
call fcn.140019290
movsxd rbx, eax
test eax, eax
je 0x140001384
mov qword [0x14006c2a8], rsi
mov dword [0x14005acf4], 3
mov qword [0x14006cb38], rdi
mov qword [0x14006cb30], rdi
mov dword [0x14005ab8c], edi
mov dword [0x14005acf0], 8
mov qword [0x14006c220], rsi
mov dword [0x14006c21c], 8
call fcn.140015e40
mov rcx, rbx
call fcn.140001e80
mov rsi, qword [rsp + 0x30]
xor eax, eax
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 0x10]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
je 0x1400013fe
mov r8d, 0x10
lea rdx, [0x140037a90]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
je 0x1400013fe
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x140001303
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x140001303
jmp 0x1400013e9
or eax, 0xffffffff
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.unable_to_start_ssh_agent_service__error_:_d
call fcn.140007c80
int3
lea rcx, str.unable_to_open_service_handle
call fcn.140007c80
int3
Function at 0x140001a30
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x50
xor edi, edi
mov ebx, ecx
mov qword [rsp + 0x68], rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r9d, ebx
lea rdx, str.agent_start
lea rcx, str._s_pid:_d__dbg:_d
mov dword [rsp + 0x60], eax
mov r8d, eax
call fcn.140007ce0
xor eax, eax
mov dword [0x14005c140], ebx
mov qword [0x14006c288], rax
lea rbx, [0x14006c288]
mov r9, rbx
mov dword [0x14006c288], 0x18
lea r8, [0x14006c290]
mov qword [0x14006c290], rax
lea edx, [rdi + 1]
mov qword [0x14006c298], rax
lea rcx, str.D:P_A__GA___SY__A__GA___BA__A__0x12019b___AU_
call qword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x140001b82
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x68]
mov qword [rsp + 0x38], rax
lea rdx, str.SOFTWAREOpenSSHAgent
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], 0x20006
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x140001b97
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x60]
mov dword [rsp + 0x28], 4
lea r9d, [rdi + 4]
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.ProcessID
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x140001ba6
xor r9d, r9d
lea edx, [rdi + 1]
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [0x14006c260], rax
test rax, rax
je 0x140001bb5
xor r9d, r9d
lea edx, [rdi + 1]
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [0x14006c280], rax
test rax, rax
je 0x140001bca
mov qword [0x14006c2a0], 0xffffffffffffffff
mov dword [0x14006c298], edi
call fcn.140001690
mov rbx, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.cannot_convert_sddl_ERROR:_d
call fcn.140007c80
int3
mov edx, eax
lea rcx, str.cannot_create_agent_root_reg_key__ERROR:_d
call fcn.140007c80
int3
mov edx, eax
lea rcx, str.cannot_publish_agent_master_process_id_ERROR:_d
call fcn.140007c80
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.cannot_create_global_stop_event_ERROR:_d
call fcn.140007c80
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.cannot_create_event_ERROR:_d
call fcn.140007c80
int3