joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140011680
Capabilities:
Delete registry value

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x40
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov rbp, rcx
call fcn.140025894
mov rcx, rax
xor esi, esi
mov edx, esi
test rax, rax
setne dl
test edx, edx
jne 0x1400116ba
mov ecx, 0x80004005
call fcn.140007cd0
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x68], rax
xor eax, eax
or rbx, 0xffffffffffffffff
mov rcx, rbx
lea rdi, str.SOFTWARESiemensShared_ToolsCompSetup
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, str.SOFTWARESiemensShared_ToolsCompSetup
lea rcx, [rsp + 0x68]
call fcn.140009100
mov rdi, qword [rsp + 0x68]
mov ecx, 1
sub ecx, dword [rdi - 8]
mov eax, dword [rdi - 0xc]
or eax, ecx
jge 0x140011719
xor edx, edx
lea rcx, [rsp + 0x68]
call fcn.140009290
mov rdi, qword [rsp + 0x68]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 0x2001f
xor r8d, r8d
mov rdx, rdi
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14001177c
lea rdx, [0x14005f448]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov esi, eax
test eax, eax
jne 0x140011770
lea rcx, [rbp + 0x38]
mov r9, qword [rcx]
lea r8, str.Delete_client_at_compsetup_interface
lea edx, [rax + 0xa]
call qword [r9 + 0xd0]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], ebx
add ebx, 0xffffffff
test ebx, ebx
jg 0x140011795
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, esi
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400117d0
Capabilities:
Delete registry value
Set registry value

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x40
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov rbp, rcx
call fcn.140025894
mov rcx, rax
xor edx, edx
test rax, rax
setne dl
test edx, edx
jne 0x140011808
mov ecx, 0x80004005
call fcn.140007cd0
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x68], rax
call fcn.140025894
mov rdx, rax
xor ecx, ecx
test rax, rax
setne cl
test ecx, ecx
jne 0x140011836
mov ecx, 0x80004005
call fcn.140007cd0
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x78], rbx
xor eax, eax
or rsi, 0xffffffffffffffff
mov rcx, rsi
lea rdi, str.SOFTWARESiemensShared_ToolsCompSetup
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, str.SOFTWARESiemensShared_ToolsCompSetup
lea rcx, [rsp + 0x68]
call fcn.140009100
mov rdx, qword [rsp + 0x68]
mov ecx, 1
sub ecx, dword [rdx - 8]
mov eax, dword [rdx - 0xc]
or eax, ecx
jge 0x140011898
xor edx, edx
lea rcx, [rsp + 0x68]
call fcn.140009290
mov rdx, qword [rsp + 0x68]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 0x2001f
xor r8d, r8d
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140011981
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140011918
cmp dword [rdx + 0x10], eax
jge 0x1400118ef
cmp dword [rbx - 0xc], eax
jge 0x1400118e1
mov ecx, 0x80070057
call fcn.140007cd0
int3
mov dword [rbx - 0x10], 0
mov word [rbx], 0
jmp 0x140011918
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140011906
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x78], rbx
mov dword [rsp + 0x28], 2
lea rax, [0x14005cb94]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, [0x14005f448]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea rcx, [rbp + 0x38]
mov rax, qword [rcx]
lea r8, str._Client_entry_set_empty.
mov edx, 0xa
call qword [rax + 0xd0]
lea rdx, str.SetupLanguage
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov edi, eax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140011983
mov edi, esi
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14001199f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x68]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
add esi, 0xffffffff
test esi, esi
jg 0x1400119bd
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
Function at 0x140021240
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
mov rax, qword [rcx]
lea rdx, [rsp + 0x30]
call qword [rax + 0x30]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140021279
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
add rsp, 0x28
ret

Function at 0x140023764
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x40
mov rsi, rdx
mov rdi, rcx
xor ebx, ebx
xor r13d, r13d
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
mov ebp, eax
jne 0x14002379c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rdi
mov ecx, eax
call fcn.1400340c0
movzx edx, byte [rsi + 0x20]
cmp edx, ebp
je 0x1400237c7
test bpl, 1
je 0x1400237c7
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x1400237c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rdi
mov ecx, eax
call fcn.1400340c0
lea rcx, [rsi + 8]
cmp qword [rcx], rbx
je 0x1400238ad
lea rdx, [rsp + 0x88]
call fcn.140023634
lea rcx, [rsi + 0x10]
cmp qword [rcx], rbx
je 0x1400237f9
lea rdx, [rsp + 0x78]
call fcn.140023634
lea r13, [rsp + 0x78]
cmp qword [rsi], rbx
je 0x140023816
lea rdx, [rsp + 0x80]
mov rcx, rsi
call fcn.140023634
lea rbx, [rsp + 0x80]
and qword [rsp + 0x30], 0
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r9 + 1]
mov rcx, rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov r12, rax
jne 0x14002385a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rdi
mov ecx, eax
call fcn.1400340c0
lea r9, [rsp + 0x88]
mov r8, r13
mov rdx, rbx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
jne 0x140023890
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r12
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, rdi
mov ecx, ebx
call fcn.1400340c0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x1400238ad
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rdi
mov ecx, eax
call fcn.1400340c0
movzx edx, byte [rsi + 0x20]
cmp edx, ebp
je 0x1400238d8
test bpl, 1
jne 0x1400238d8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x1400238d8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rdi
mov ecx, eax
call fcn.1400340c0
mov rbx, qword [rsp + 0x70]
add rsp, 0x40
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400238ec
Capabilities:
Get file attributes
Get file size

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x38
mov rbx, rdx
mov rdi, rcx
mov r8d, 0x230
mov rcx, rbx
xor edx, edx
call fcn.14003a7a0
mov r8, qword [rdi + 0x18]
lea rcx, [rbx + 0x22]
or r9, 0xffffffffffffffff
mov edx, 0x104
call fcn.14003d270
xor esi, esi
cmp eax, esi
je 0x14002394d
cmp eax, 0xc
je 0x140023947
cmp eax, 0x16
je 0x140023941
cmp eax, 0x22
je 0x140023941
cmp eax, 0x50
je 0x14002394d
call fcn.1400254a0
int3
call fcn.1400254a0
int3
call fcn.140025458
int3
mov rcx, qword [rdi + 8]
cmp rcx, qword [0x140066930]
je 0x140023aab
lea r9, [rsp + 0x70]
lea r8, [rsp + 0x68]
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileTime]
cmp eax, esi
jne 0x14002397e
xor eax, eax
jmp 0x140023ab0
mov rcx, qword [rdi + 8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, 0xffffffff
mov r11d, eax
cmp r11, rbp
mov qword [rbx + 0x18], r11
je 0x140023977
mov rcx, qword [rdi + 0x18]
cmp dword [rcx - 0x10], esi
jne 0x1400239aa
mov byte [rbx + 0x20], sil
jmp 0x1400239bb
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
movzx ecx, al
cmp eax, ebp
cmove ecx, esi
mov byte [rbx + 0x20], cl
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
cmp eax, esi
je 0x1400239fe
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
cmp eax, esi
je 0x1400239fe
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x78]
or r8d, 0xffffffff
call fcn.1400233c8
mov rcx, qword [rax]
mov qword [rbx], rcx
jmp 0x140023a01
mov qword [rbx], rsi
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
cmp eax, esi
je 0x140023a45
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
cmp eax, esi
je 0x140023a45
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x78]
or r8d, 0xffffffff
call fcn.1400233c8
mov rax, qword [rax]
mov qword [rbx + 0x10], rax
jmp 0x140023a49
mov qword [rbx + 0x10], rsi
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
cmp eax, esi
je 0x140023a8d
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
cmp eax, esi
je 0x140023a8d
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x78]
or r8d, 0xffffffff
call fcn.1400233c8
mov rax, qword [rax]
mov qword [rbx + 8], rax
jmp 0x140023a91
mov qword [rbx + 8], rsi
cmp qword [rbx], rsi
jne 0x140023a9d
mov rax, qword [rbx + 8]
mov qword [rbx], rax
cmp qword [rbx + 0x10], rsi
jne 0x140023aab
mov rax, qword [rbx + 8]
mov qword [rbx + 0x10], rax
mov eax, 1
add rsp, 0x38
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140028e08
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0x280
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x14007d2f0]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov rsi, rdx
mov rdi, rcx
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x40], rdx
lea r8, [rsp + 0x30]
mov rdx, qword [rdx]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov ebx, eax
test eax, eax
jne 0x140028f07
mov r9d, 0x104
lea r8, [rsp + 0x60]
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov ebx, eax
test eax, eax
jne 0x140028ede
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x28]
call fcn.140008540
nop
lea rdx, [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
call fcn.140028e08
mov ebx, eax
test eax, eax
setne byte [rsp + 0x20]
mov rdx, qword [rsp + 0x28]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140028ec5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
cmp byte [rsp + 0x20], 0
je 0x140028ece
jmp 0x140028ede
jmp 0x140028e5e
cmp ebx, 0x103
je 0x140028eee
cmp ebx, 0x3f2
jne 0x140028efc
mov rdx, qword [rsi]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov ebx, eax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.14003a760
lea r11, [rsp + 0x280]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret

Function at 0x14002b740
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov edi, ecx
call fcn.140032e0c
mov rbx, rax
mov rax, qword [rax + 0x78]
test rax, rax
je 0x14002b777
mov rcx, qword [rax + 0x40]
test rcx, rcx
je 0x14002b777
xor r9d, r9d
xor r8d, r8d
mov edx, 0x401
call qword [sym.imp.USER32.dll_SendMessageW]
test edi, edi
mov rbx, qword [rbx + 0xa0]
je 0x14002b7a7
test rbx, rbx
je 0x14002b7a7
mov ecx, 1
call qword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
js 0x14002b7a7
mov rax, qword [rbx]
or rdx, 0xffffffffffffffff
mov rcx, rbx
call qword [rax + 0x2d0]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140034b1c
Capabilities:
Set thread local storage value

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 r13
push r14
sub rsp, 0x20
mov esi, 1
mov r14, r8
mov rdi, rdx
cmp dword [rdx + 0x10], esi
mov r12, rcx
mov ebp, esi
jle 0x140034ba9
lea ebx, [rsi + 7]
lea r13d, [rsi + 0xf]
test r14, r14
je 0x140034b75
mov rax, qword [r12 + 0x10]
cmp qword [rax + r13 + 8], r14
je 0x140034b75
mov rax, qword [rdi + 0x18]
cmp qword [rbx + rax], 0
je 0x140034b95
xor esi, esi
jmp 0x140034b95
mov rax, qword [rdi + 0x18]
mov rcx, qword [rbx + rax]
test rcx, rcx
je 0x140034b8c
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rax, qword [rdi + 0x18]
and qword [rbx + rax], 0
add ebp, 1
add r13, 0x10
add rbx, 8
cmp ebp, dword [rdi + 0x10]
jl 0x140034b55
test esi, esi
je 0x140034bf0
lea rcx, [r12 + 0x28]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rcx, [r12 + 0x18]
mov rdx, rdi
call fcn.14003463c
lea rcx, [r12 + 0x28]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r11, qword [rdi]
mov edx, 1
mov rcx, rdi
call qword [r11]
mov ecx, dword [r12]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop r13
pop r12
ret

Function at 0x140036930
Capabilities:
Get graphical window text

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x230
mov rax, qword [0x14007d2f0]
xor rax, rsp
mov qword [rsp + 0x220], rax
test rcx, rcx
mov rbx, rdx
mov rdi, rcx
jne 0x140036965
call fcn.1400254a0
int3
test rdx, rdx
jne 0x140036970
call fcn.1400254a0
int3
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
and word [rsp + 0x20], 0
lea rcx, [rsp + 0x22]
xor edx, edx
mov r8d, 0x1fe
mov esi, eax
call fcn.14003a7a0
mov r8d, 0x100
cmp esi, r8d
ja 0x1400369c2
lea rdx, [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.USER32.dll_GetWindowTextW]
cmp eax, esi
jne 0x1400369c2
lea rcx, [rsp + 0x20]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1400369ce
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.USER32.dll_SetWindowTextW]
mov rcx, qword [rsp + 0x220]
xor rcx, rsp
call fcn.14003a760
lea r11, [rsp + 0x230]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
Function at 0x14003a970
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbx
sub rsp, 0x30
test rcx, rcx
mov ebx, edx
jne 0x14003a9b6
call fcn.14003e380
mov dword [rax], 0
call fcn.14003e350
mov ebx, 0x16
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov dword [rax], ebx
mov qword [rsp + 0x20], 0
call fcn.1400441f0
neg ebx
sbb eax, eax
add rsp, 0x30
pop rbx
ret
test edx, 0xfffffff9
jne 0x14003a97d
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14003a9e7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14003e3b0
call fcn.14003e350
mov ebx, dword [rax]
neg ebx
sbb eax, eax
add rsp, 0x30
pop rbx
ret
test al, 0x10
jne 0x14003aa1b
test al, 1
je 0x14003aa1b
test bl, 2
je 0x14003aa1b
call fcn.14003e380
mov dword [rax], 5
call fcn.14003e350
mov dword [rax], 0xd
call fcn.14003e350
mov ebx, dword [rax]
neg ebx
sbb eax, eax
add rsp, 0x30
pop rbx
ret
xor ebx, ebx
neg ebx
sbb eax, eax
add rsp, 0x30
pop rbx
ret
Function at 0x1400406b0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r12
sub rsp, 0x30
lea r12, [0x14007d4b0]
xor esi, esi
mov edi, ecx
mov rax, r12
mov ebx, esi
nop
cmp ecx, dword [rax]
je 0x1400406ee
add ebx, 1
add rax, 0x10
cmp ebx, 0x17
jb 0x1400406d0
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
cmp ebx, 0x17
jae 0x1400408d5
mov ecx, 3
call fcn.140050ef0
cmp eax, 1
je 0x14004088c
mov ecx, 3
call fcn.140050ef0
test eax, eax
jne 0x140040725
cmp dword [0x14007d2e8], 1
je 0x14004088c
cmp edi, 0xfc
je 0x1400408d5
mov qword [rsp + 0x50], rbp
lea rbp, [0x140082c00]
lea r8, str.Runtime_Error__n_nProgram:
mov rcx, rbp
mov edx, 0x314
call fcn.140050e40
test eax, eax
je 0x140040769
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.140044150
lea rdx, [0x140082c19]
mov r8d, 0x104
xor ecx, ecx
mov byte [0x140082d1d], sil
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1400407b9
lea r8, str._program_name_unknown_
lea rcx, [0x140082c19]
mov edx, 0x2fb
call fcn.140050e40
test eax, eax
je 0x1400407b9
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.140044150
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [0x140082c19]
repne scasb al, byte [rdi]
not rcx
cmp rcx, 0x3c
jbe 0x140040808
lea rcx, [rcx + rbp - 0x23]
lea rdx, [0x140082f14]
lea r9d, [rax + 3]
lea r8, [0x14006a7b4]
sub rdx, rcx
call fcn.140050d20
test eax, eax
je 0x140040808
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.140044150
lea r8, [0x14006a7b0]
mov edx, 0x314
mov rcx, rbp
call fcn.140050c60
test eax, eax
je 0x140040834
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.140044150
movsxd r8, ebx
mov edx, 0x314
mov rcx, rbp
add r8, r8
mov r8, qword [r12 + r8*8 + 8]
call fcn.140050c60
test eax, eax
je 0x140040864
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.140044150
lea rdx, str.Microsoft_Visual_C_Runtime_Library
mov r8d, 0x12010
mov rcx, rbp
call fcn.140050a00
mov rbp, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
test rax, rax
mov r11, rax
je 0x1400408d5
cmp rax, 0xffffffffffffffff
je 0x1400408d5
xor eax, eax
movsxd rcx, ebx
lea r9, [rsp + 0x58]
add rcx, rcx
mov qword [rsp + 0x20], rsi
mov rdx, qword [r12 + rcx*8 + 8]
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
Function at 0x1400408f0
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
mov ecx, 3
call fcn.140050ef0
cmp eax, 1
je 0x140040922
mov ecx, 3
call fcn.140050ef0
test eax, eax
jne 0x1400409d6
cmp dword [0x14007d2e8], 1
jne 0x1400409d6
mov qword [rsp + 0x48], rbx
lea rbx, [0x14007d4b0]
mov qword [rsp + 0x30], rdi
mov rax, rbx
xor edi, edi
cmp dword [rax], 0xfc
je 0x14004094e
add edi, 1
add rax, 0x10
cmp edi, 0x17
jb 0x140040938
jmp 0x1400409c2
cmp edi, 0x17
jae 0x1400409c2
mov ecx, 3
call fcn.140050ef0
cmp eax, 1
je 0x140040979
mov ecx, 3
call fcn.140050ef0
test eax, eax
jne 0x1400409c2
cmp dword [0x14007d2e8], 1
jne 0x1400409c2
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
test rax, rax
mov r11, rax
je 0x1400409c2
cmp rax, 0xffffffffffffffff
je 0x1400409c2
movsxd rcx, edi
xor eax, eax
lea r9, [rsp + 0x40]
add rcx, rcx
mov qword [rsp + 0x20], rax
mov rdx, qword [rbx + rcx*8 + 8]
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, 0xff
call fcn.1400406b0
mov rdi, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x48]
add rsp, 0x38
ret
Function at 0x1400411f0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x30
mov eax, dword [0x14008312c]
xor r12d, r12d
test eax, eax
mov ebp, r12d
jne 0x14004124c
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test rax, rax
mov rdi, rax
je 0x14004122c
mov dword [0x14008312c], 1
jmp 0x14004125f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x140041246
mov dword [0x14008312c], 2
jmp 0x1400412c9
mov eax, dword [0x14008312c]
cmp eax, 1
jne 0x1400412c0
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test rax, rax
mov rdi, rax
je 0x14004129a
cmp word [rdi], bp
mov rax, rdi
je 0x140041279
add rax, 2
cmp word [rax], bp
jne 0x140041267
add rax, 2
cmp word [rax], bp
jne 0x140041267
sub eax, edi
add eax, 2
movsxd rsi, eax
mov rcx, rsi
call fcn.14004c4f0
test rax, rax
mov rbx, rax
jne 0x1400412a1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1400413bb
mov r8, rsi
mov rdx, rdi
mov rcx, rax
call fcn.14003d880
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbx
jmp 0x1400413bb
cmp eax, 2
je 0x1400412c9
test eax, eax
jne 0x14004129a
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
test rax, rax
mov rsi, rax
je 0x14004129a
cmp byte [rax], bpl
mov rbx, rax
je 0x140041318
nop
or r9d, 0xffffffff
mov r8, rbx
xor ecx, ecx
lea edx, [r9 + 2]
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x14004129a
or rcx, 0xffffffffffffffff
add ebp, eax
mov rdi, rbx
xor eax, eax
repne scasb al, byte [rdi]
not rcx
add rbx, rcx
cmp byte [rbx], al
jne 0x1400412e0
add ebp, 1
mov edx, 2
movsxd rcx, ebp
call fcn.14004c560
test rax, rax
mov r12, rax
jne 0x14004133d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
jmp 0x1400413bb
cmp byte [rsi], 0
mov qword [rsp + 0x50], r13
mov rbx, rax
mov r13, rsi
je 0x1400413a5
nop
or r9d, 0xffffffff
mov eax, ebp
mov rcx, rbx
sub rcx, r12
lea edx, [r9 + 2]
mov r8, r13
sar rcx, 1
sub eax, ecx
xor ecx, ecx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x1400413ce
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r13
repne scasb al, byte [rdi]
mov rdi, rbx
not rcx
add r13, rcx
or rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
cmp byte [r13], al
not rcx
lea rbx, [rbx + rcx*2]
jne 0x140041350
mov rcx, rsi
mov word [rbx], 0
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov rax, r12
mov r13, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
mov rcx, r12
call fcn.14003d170
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
jmp 0x1400413b6