joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14002fd30
Capabilities:
Enumerate files on windows
Get common file path

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x2a8
mov r14, rcx
mov rax, qword [0x140127050]
xor rax, rsp
mov qword [rsp + 0x2a0], rax
lea rdi, [rsp + 0x50]
mov rcx, rdi
mov edx, 0x107
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov rcx, rdi
call fcn.1400cdf90
mov word [rsp + rax + 0x50], 0x2a5c
mov byte [rsp + rax + 0x52], 0
lea rdx, [rsp + 0x160]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp rax, 0xffffffffffffffff
je 0x14002fdd0
mov rdi, rax
lea rbx, [rsp + 0x160]
mov rsi, qword [sym.imp.KERNEL32.dll_FindNextFileA]
nop word cs:[rax + rax]
nop dword [rax + rax]
mov rcx, rbx
mov edx, 0x140
call r14
mov rcx, rdi
mov rdx, rbx
call rsi
test eax, eax
jne 0x14002fdb0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rsp + 0x2c], eax
lea rcx, [rsp + 0x2c]
mov edx, 4
call r14
lea rcx, [rsp + 0x30]
mov edx, 0x20
call fcn.14002fbe0
test al, al
je 0x14002fe17
lea rdi, [rsp + 0x30]
mov rcx, rdi
mov edx, 0x20
call r14
mov edx, 0x20
mov rcx, rdi
call fcn.140076fb0
mov rcx, r14
call fcn.14003d100
mov rcx, qword [rsp + 0x2a0]
xor rcx, rsp
call fcn.1400b8300
nop
add rsp, 0x2a8
pop rbx
pop rdi
pop rsi
pop r14
ret

Function at 0x14002fe40
Capabilities:
Get memory capacity

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0xa8
mov rax, qword [0x140127050]
xor rax, rsp
mov qword [rsp + 0xa0], rax
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov qword [rsp + 0x78], rax
lea rsi, [rsp + 0x78]
mov ecx, 9
mov rdx, rsi
mov r8d, 8
call fcn.14002f910
call qword [sym.imp.USER32.dll_GetCapture]
mov qword [rsp + 0x78], rax
mov ecx, 0xa
mov rdx, rsi
mov r8d, 8
call fcn.14002f910
call qword [sym.imp.USER32.dll_GetClipboardOwner]
mov qword [rsp + 0x78], rax
mov ecx, 0xb
mov rdx, rsi
mov r8d, 8
call fcn.14002f910
mov ecx, 0x1cbf
call qword [sym.imp.USER32.dll_GetQueueStatus]
mov dword [rsp + 0x74], eax
lea rdx, [rsp + 0x74]
mov ecx, 0xc
mov r8d, 4
call fcn.14002f910
lea rsi, [rsp + 0x68]
mov rcx, rsi
call qword [sym.imp.USER32.dll_GetCursorPos]
mov ecx, 0xd
mov rdx, rsi
mov r8d, 8
call fcn.14002f910
lea rsi, [rsp + 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
mov ecx, 6
mov rdx, rsi
mov r8d, 0x38
call fcn.14002f910
lea rsi, [rsp + 0x98]
lea r14, [rsp + 0x90]
lea rdi, [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov qword [rsp + 0x20], rsi
lea rbx, [rsp + 0x80]
mov rcx, rax
mov rdx, rbx
mov r8, rdi
mov r9, r14
call qword [sym.imp.KERNEL32.dll_GetThreadTimes]
mov ecx, 0xe
mov rdx, rbx
mov r8d, 0x20
call fcn.14002f910
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rsp + 0x20], rsi
mov rcx, rax
mov rdx, rbx
mov r8, rdi
mov r9, r14
call qword [sym.imp.KERNEL32.dll_GetProcessTimes]
mov ecx, 0xf
mov rdx, rbx
mov r8d, 0x20
call fcn.14002f910
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.1400b8300
nop
add rsp, 0xa8
pop rbx
pop rdi
pop rsi
pop r14
ret
Function at 0x140036760
Capabilities:
Get session user name

Disassembly:
push rsi
sub rsp, 0x20
mov rsi, rcx
mov edx, 0x3a
call fcn.140040c20
cmp byte [rax], 0
je 0x140036784
mov rcx, rax
add rsp, 0x20
pop rsi
jmp fcn.140049ac0
mov rcx, rsi
mov edx, 0x3b
call fcn.1400409d0
test al, al
je 0x14003679f
add rsp, 0x20
pop rsi
jmp fcn.140078540
xor eax, eax
add rsp, 0x20
pop rsi
ret
Function at 0x1400387b0
Capabilities:
Set registry value

Disassembly:
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov rbx, r8
mov rsi, rdx
mov rdi, rcx
mov ebp, dword [rsp + 0x70]
mov rcx, r8
mov edx, r9d
call fcn.140040a90
cmp eax, 1
je 0x14003881c
cmp eax, 2
je 0x140038825
cmp eax, 3
jne 0x14003882e
mov rcx, rbx
mov edx, ebp
call fcn.140040c20
lea rcx, str.custom:
mov rdx, rax
xor r8d, r8d
call fcn.140041d40
mov rbx, rax
mov rcx, rdi
mov rdx, rsi
mov r8, rax
call fcn.14003c3c0
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
jmp fcn.140042cc0
lea r8, str.implicit
jmp 0x140038835
lea r8, str.explicit
jmp 0x140038835
lea r8, str.none
mov rcx, rdi
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
jmp fcn.14003c3c0
Function at 0x14003c3c0
Capabilities:
Set registry value

Disassembly:
test rcx, rcx
je 0x14003c3cd
mov rcx, qword [rcx]
jmp fcn.140045f60
ret

Function at 0x14003c3d0
Capabilities:
Set registry value

Disassembly:
test rcx, rcx
je 0x14003c3dd
mov rcx, qword [rcx]
jmp fcn.140045e10
ret

Function at 0x14003c490
Capabilities:
Query or enumerate registry value

Disassembly:
test rcx, rcx
je 0x14003c49d
mov rcx, qword [rcx]
jmp fcn.140045e70
xor eax, eax
ret

Function at 0x14003c770
Capabilities:
Set registry value

Disassembly:
test rcx, rcx
je 0x14003c780
mov r8, qword [r8]
mov rcx, qword [rcx]
jmp fcn.140045f60
ret

Function at 0x14003c7c0
Capabilities:
Delete registry key

Disassembly:
sub rsp, 0x38
mov rax, qword [0x140127050]
xor rax, rsp
mov qword [rsp + 0x30], rax
cmp dword [0x14012ae30], 6
jb 0x14002a8b2
jne 0x14002a867
cmp dword [0x14012ae34], 0
je 0x14002a8b2
call fcn.14003d760
test eax, eax
je 0x14002a8c5
lea rax, [rsp + 0x28]
mov qword [rsp + 0x20], rax
lea rcx, [0x1400ed1d0]
lea r9, [0x1400ed1c0]
xor edx, edx
mov r8d, 1
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jne 0x14002a8b2
mov rcx, qword [rsp + 0x28]
mov rax, qword [rcx]
xor edx, edx
call qword [rax + 0x50]
mov rcx, qword [rsp + 0x28]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1400b8300
nop
add rsp, 0x38
ret
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1400b8300
nop
add rsp, 0x38
jmp 0x14002a3f0
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rsi, rcx
lea r8, str.SoftwareSimonTathamPuTTYSessions
xor ecx, ecx
mov rdx, 0xffffffff80000001
xor r9d, r9d
call fcn.140045b90
test rax, rax
je 0x14003c827
mov rdi, rax
call fcn.1400432f0
mov rbx, rax
mov rcx, rsi
mov rdx, rax
call fcn.140078740
mov rdx, qword [rbx]
mov rcx, rdi
call sub.ADVAPI32.dll_RegDeleteKeyA
mov rcx, rbx
call fcn.1400433f0
mov rcx, rdi
call sub.ADVAPI32.dll_RegCloseKey
mov rcx, rsi
add rsp, 0x20
pop rbx
pop rdi
pop rsi
jmp 0x14002a840
nop
add rsp, 0x20
pop rbx
pop rdi
pop rsi
ret
Function at 0x14003d0a0
Capabilities:
Delete registry key

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rsi, rcx
lea r8, str.SoftwareSimonTathamPuTTYSshHostCAs
xor ecx, ecx
mov rdx, 0xffffffff80000001
xor r9d, r9d
call fcn.140045b90
test rax, rax
je 0x14003d0f0
mov rdi, rax
call fcn.1400432f0
mov rbx, rax
mov rcx, rsi
mov rdx, rax
call fcn.140078740
mov rdx, qword [rbx]
mov rcx, rdi
call sub.ADVAPI32.dll_RegDeleteKeyA
mov rcx, rbx
call fcn.1400433f0
xor eax, eax
add rsp, 0x20
pop rbx
pop rdi
pop rsi
ret

Function at 0x14003d100
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x440
mov rsi, rcx
mov rax, qword [0x140127050]
xor rax, rsp
mov qword [rsp + 0x438], rax
mov ecx, 1
call fcn.14003d1e0
cmp rax, 0xffffffffffffffff
je 0x14003d1b5
mov rdi, rax
mov qword [rsp + 0x20], 0
lea rdx, [rsp + 0x30]
lea r9, [rsp + 0x2c]
mov rcx, rax
mov r8d, 0x400
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14003d1ac
mov edx, dword [rsp + 0x2c]
test edx, edx
je 0x14003d1ac
lea rbx, [rsp + 0x30]
lea r14, [rsp + 0x2c]
mov r15, qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax]
mov rcx, rbx
call rsi
mov qword [rsp + 0x20], 0
mov rcx, rdi
mov rdx, rbx
mov r8d, 0x400
mov r9, r14
call r15
test eax, eax
je 0x14003d1ac
mov edx, dword [rsp + 0x2c]
test edx, edx
jne 0x14003d180
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x438]
xor rcx, rsp
call fcn.1400b8300
nop
add rsp, 0x440
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x14003d1e0
Capabilities:
Get common file path
Query environment variable

Disassembly:
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x258
mov ebp, ecx
mov rax, qword [0x140127050]
xor rax, rsp
mov qword [rsp + 0x250], rax
lea r8, str.SoftwareSimonTathamPuTTY
xor ecx, ecx
mov rdx, 0xffffffff80000001
xor r9d, r9d
call fcn.140045b90
test rax, rax
je 0x14003d25f
mov rbx, rax
lea rdx, str.RandSeedFile
mov rcx, rax
call fcn.140045e70
mov rsi, rax
mov rcx, rbx
call sub.ADVAPI32.dll_RegCloseKey
test rsi, rsi
je 0x14003d25f
lea r8, [rsp + 0x28]
mov rcx, rsi
mov edx, ebp
call fcn.14003d940
mov ebx, eax
mov rcx, rsi
call fcn.140042cc0
test bl, bl
jne 0x14003d451
cmp byte [0x14012a5d8], 0
je 0x14003d279
mov rsi, qword [0x14012a5e8]
test rsi, rsi
jne 0x14003d2bf
jmp 0x14003d371
lea rcx, str.shell32.dll
call fcn.1400459f0
mov qword [0x14012a5e0], rax
test rax, rax
je 0x14003d2a6
lea rdx, str.SHGetFolderPathA
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
jmp 0x14003d2a8
xor esi, esi
mov qword [0x14012a5e8], rsi
mov byte [0x14012a5d8], 1
test rsi, rsi
je 0x14003d371
lea rdi, [rsp + 0x140]
mov qword [rsp + 0x20], rdi
xor ecx, ecx
mov edx, 0x1c
xor r8d, r8d
xor r9d, r9d
call rsi
test eax, eax
js 0x14003d31a
lea rdx, str.PUTTY.RND
lea rcx, [rsp + 0x140]
xor r8d, r8d
call fcn.140041d40
mov rsi, rax
lea r8, [rsp + 0x28]
mov rcx, rax
mov edx, ebp
call fcn.14003d940
mov ebx, eax
mov rcx, rsi
call fcn.140042cc0
test bl, bl
jne 0x14003d451
mov qword [rsp + 0x20], rdi
xor ecx, ecx
mov edx, 0x1a
xor r8d, r8d
xor r9d, r9d
call qword [0x14012a5e8]
test eax, eax
js 0x14003d371
lea rdx, str.PUTTY.RND
lea rcx, [rsp + 0x140]
xor r8d, r8d
call fcn.140041d40
mov rsi, rax
lea r8, [rsp + 0x28]
mov rcx, rax
mov edx, ebp
call fcn.14003d940
mov ebx, eax
mov rcx, rsi
call fcn.140042cc0
test bl, bl
jne 0x14003d451
lea rcx, str.HOMEDRIVE
mov rdi, qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea rdx, [rsp + 0x140]
mov r8d, 0x104
call rdi
mov esi, eax
lea rcx, str.HOMEPATH
lea rdx, [rsp + 0x30]
mov r8d, 0x104
call rdi
test esi, esi
jne 0x14003d3b1
mov byte [rsp + 0x140], 0
cmp esi, 0x103
ja 0x14003d400
cmp eax, 0x103
ja 0x14003d400
test eax, eax
je 0x14003d400
lea r8, str.PUTTY.RND
lea rcx, [rsp + 0x140]
lea rdx, [rsp + 0x30]
xor r9d, r9d
call fcn.140041d40
mov rsi, rax
lea r8, [rsp + 0x28]
mov rcx, rax
mov edx, ebp
call fcn.14003d940
mov ebx, eax
mov rcx, rsi
call fcn.140042cc0
test bl, bl
jne 0x14003d451
lea rcx, [rsp + 0x140]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp eax, 0x104
jae 0x14003d458
lea rdx, str.PUTTY.RND
lea rcx, [rsp + 0x140]
xor r8d, r8d
call fcn.140041d40
mov rsi, rax
lea r8, [rsp + 0x28]
mov rcx, rax
mov edx, ebp
call fcn.14003d940
mov ebx, eax
mov rcx, rsi
call fcn.140042cc0
test bl, bl
je 0x14003d458
mov rsi, qword [rsp + 0x28]
jmp 0x14003d45f
mov rsi, 0xffffffffffffffff
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.1400b8300
mov rax, rsi
add rsp, 0x258
pop rbx
pop rbp
pop rdi
pop rsi
ret
Function at 0x14003d480
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x40
mov esi, edx
mov rdi, rcx
mov rax, qword [0x140127050]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov ecx, 2
call fcn.14003d1e0
cmp rax, 0xffffffffffffffff
je 0x14003d4d4
mov rbx, rax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x34]
mov rcx, rax
mov rdx, rdi
mov r8d, esi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400b8300
nop
add rsp, 0x40
pop rbx
pop rdi
pop rsi
ret

Function at 0x14003d7e0
Capabilities:
Delete registry key

Disassembly:
push rsi
push rdi
sub rsp, 0x28
xor ecx, ecx
call fcn.14003d1e0
call fcn.14002a2e0
lea r8, str.SoftwareSimonTathamPuTTY
xor ecx, ecx
mov rdx, 0xffffffff80000001
xor r9d, r9d
call fcn.140045b90
test rax, rax
je 0x14003d822
mov rsi, rax
mov rcx, rax
call fcn.14003d8c0
mov rcx, rsi
call sub.ADVAPI32.dll_RegCloseKey
lea r8, str.SoftwareSimonTatham
xor ecx, ecx
mov rdx, 0xffffffff80000001
xor r9d, r9d
call fcn.140045b90
test rax, rax
je 0x14003d8b6
mov rsi, rax
lea rdx, [0x14010b9e3]
mov rcx, rax
call sub.ADVAPI32.dll_RegDeleteKeyA
mov rcx, rsi
xor edx, edx
call fcn.140045ce0
mov rdi, rax
mov rcx, rsi
call sub.ADVAPI32.dll_RegCloseKey
test rdi, rdi
je 0x14003d879
mov rcx, rdi
add rsp, 0x28
pop rdi
pop rsi
jmp fcn.140042cc0
lea r8, str.Software
xor ecx, ecx
mov rdx, 0xffffffff80000001
xor r9d, r9d
call fcn.140045b90
test rax, rax
je 0x14003d8b6
mov rsi, rax
lea rdx, [0x140106d9c]
mov rcx, rax
call sub.ADVAPI32.dll_RegDeleteKeyA
mov rcx, rsi
add rsp, 0x28
pop rdi
pop rsi
jmp sub.ADVAPI32.dll_RegCloseKey
nop
add rsp, 0x28
pop rdi
pop rsi
ret

Function at 0x14003d8c0
Capabilities:
Delete registry key

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rsi, rcx
xor edx, edx
call fcn.140045ce0
test rax, rax
je 0x14003d92f
mov rdi, rax
jmp 0x14003d905
mov rcx, rsi
mov rdx, rdi
call sub.ADVAPI32.dll_RegDeleteKeyA
mov rcx, rdi
call fcn.140042cc0
mov rcx, rsi
xor edx, edx
call fcn.140045ce0
mov rdi, rax
test rax, rax
je 0x14003d92f
xor ecx, ecx
mov rdx, rsi
mov r8, rdi
xor r9d, r9d
call fcn.140045b90
test rax, rax
je 0x14003d8e0
mov rbx, rax
mov rcx, rax
call fcn.14003d8c0
mov rcx, rbx
call sub.ADVAPI32.dll_RegCloseKey
jmp 0x14003d8e0
add rsp, 0x20
pop rbx
pop rdi
pop rsi
ret
Function at 0x14003d940
Capabilities:
Check if file exists
Delete file

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov rsi, r8
mov rdi, rcx
test edx, edx
je 0x14003d99f
xor eax, eax
xor ecx, ecx
cmp edx, 2
setne al
sete cl
lea r8d, [rax + rax*2]
mov eax, 0x40000000
mov edx, 0x80000000
cmove edx, eax
mov eax, ecx
shl eax, 7
xor ecx, 3
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov qword [rsp + 0x30], 0
mov rcx, rdi
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsi], rax
cmp rax, 0xffffffffffffffff
setne al
jmp 0x14003d9df
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x14003d9d6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x14003d9d6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140047200
lea rcx, str.Unable_to_delete__s:__s
mov rdx, rdi
mov r8, rax
call fcn.140007130
mov qword [rsi], 0xffffffffffffffff
xor eax, eax
add rsp, 0x38
pop rdi
pop rsi
ret
Function at 0x140045ce0
Capabilities:
Query or enumerate registry key

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov ebp, edx
mov rbx, rcx
mov rax, qword [0x140127050]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 0x105
mov edi, 0x105
mov ecx, 0x105
mov edx, 1
xor r8d, r8d
call fcn.140042c20
mov rsi, rax
mov r15, qword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
lea r14, [rsp + 0x38]
nop
mov rcx, rbx
mov edx, ebp
mov r8, rsi
mov r9d, edi
call r15
cmp eax, 0xea
jne 0x140045d73
mov r9, qword [rsp + 0x38]
mov byte [rsp + 0x28], 0
mov qword [rsp + 0x20], 1
mov r8d, 1
mov rcx, rsi
mov rdx, r14
call fcn.140042cd0
mov rsi, rax
mov rdi, qword [rsp + 0x38]
jmp 0x140045d30
test eax, eax
je 0x140045d81
mov rcx, rsi
call fcn.140042cc0
xor esi, esi
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400b8300
mov rax, rsi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret

Function at 0x140045da0
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
sub rsp, 0x40
mov rax, qword [0x140127050]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 4
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r8
lea r9, [rsp + 0x34]
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [rsp + 0x30]
xor ecx, 4
or ecx, eax
mov eax, dword [rsp + 0x34]
xor eax, 4
or eax, ecx
sete bl
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400b8300
mov eax, ebx
add rsp, 0x40
pop rbx
ret

Function at 0x140045e10
Capabilities:
Set registry value

Disassembly:
push rbx
sub rsp, 0x40
mov rax, qword [0x140127050]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x34], r8d
lea rax, [rsp + 0x34]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 4
xor r8d, r8d
mov r9d, 4
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
sete bl
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400b8300
mov eax, ebx
add rsp, 0x40
pop rbx
ret
Function at 0x140045e70
Capabilities:
Query or enumerate registry value

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x40
mov r14, rdx
mov rbx, rcx
mov rax, qword [0x140127050]
xor rax, rsp
mov qword [rsp + 0x38], rax
lea r15, [rsp + 0x30]
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], 0
xor esi, esi
lea r9, [rsp + 0x34]
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140045f3c
cmp dword [rsp + 0x34], 1
jne 0x140045f3c
mov edi, dword [rsp + 0x30]
add edi, 1
mov edx, 1
mov rcx, rdi
xor r8d, r8d
call fcn.140042c20
mov rsi, rax
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
mov rcx, rbx
mov rdx, r14
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140045f32
cmp dword [rsp + 0x34], 1
jne 0x140045f32
mov eax, dword [rsp + 0x30]
cmp eax, edi
jb 0x140045f2a
lea rcx, str.size___allocsize
lea rdx, str._home_simon_mem_.build_workdirs_bob_jmc5owxa_putty_windows_utils_registry.c
mov r8d, 0x6c
call fcn.1400c91bc
mov eax, dword [rsp + 0x30]
mov eax, eax
mov byte [rsi + rax], 0
jmp 0x140045f3c
mov rcx, rsi
call fcn.140042cc0
xor esi, esi
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400b8300
mov rax, rsi
add rsp, 0x40
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret

Function at 0x140045f60
Capabilities:
Set registry value

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x30
mov rsi, r8
mov rdi, rdx
mov rbx, rcx
mov rcx, r8
call fcn.1400cdf90
add eax, 1
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rsi
mov rcx, rbx
mov rdx, rdi
xor r8d, r8d
mov r9d, 1
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
sete al
add rsp, 0x30
pop rbx
pop rdi
pop rsi
ret

Function at 0x140045fb0
Capabilities:
Query or enumerate registry value

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x48
mov rdi, rdx
mov rbx, rcx
mov rax, qword [0x140127050]
xor rax, rsp
mov qword [rsp + 0x40], rax
lea r14, [rsp + 0x38]
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], 0
xor esi, esi
lea r9, [rsp + 0x3c]
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140046078
cmp dword [rsp + 0x3c], 7
jne 0x140046078
call fcn.1400432f0
mov rsi, rax
mov edx, dword [rsp + 0x38]
add rdx, 2
mov rcx, rax
call fcn.1400431d0
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x3c]
mov rcx, rbx
mov rdx, rdi
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x14004606e
cmp dword [rsp + 0x3c], 7
jne 0x14004606e
mov edx, dword [rsp + 0x38]
mov rcx, rsi
call fcn.140043230
nop dword [rax]
mov rcx, rsi
xor edx, edx
call fcn.1400432c0
test al, al
jne 0x140046050
mov rcx, rsi
add rcx, 0x18
xor edx, edx
call fcn.1400422d0
jmp 0x140046078
mov rcx, rsi
call fcn.1400433f0
xor esi, esi
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400b8300
mov rax, rsi
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop r14
ret
Function at 0x1400460a0
Capabilities:
Set registry value

Disassembly:
sub rsp, 0x38
mov eax, dword [r8 + 0x10]
add eax, 1
mov r8, qword [r8]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r8
xor r8d, r8d
mov r9d, 7
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
sete al
add rsp, 0x38
ret
Function at 0x1400464f0
Capabilities:
Link many functions at runtime

Disassembly:
sub rsp, 0x28
cmp byte [0x14012adb0], 1
jne 0x140046508
mov al, byte [0x14012adb1]
jmp 0x14004668e
mov byte [0x14012adb0], 1
lea rcx, str.advapi32.dll
call fcn.1400459f0
mov qword [0x14012adb8], rax
test rax, rax
je 0x140046686
lea rdx, str.GetSecurityInfo
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14012adc0], rax
test rax, rax
je 0x140046686
mov rcx, qword [0x14012adb8]
test rcx, rcx
je 0x14004663f
lea rdx, str.SetSecurityInfo
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14012adc8], rax
test rax, rax
je 0x140046686
mov rcx, qword [0x14012adb8]
test rcx, rcx
je 0x14004664e
lea rdx, str.OpenProcessToken
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14012add0], rax
test rax, rax
je 0x140046686
mov rcx, qword [0x14012adb8]
test rcx, rcx
je 0x14004665d
lea rdx, str.GetTokenInformation
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14012add8], rax
test rax, rax
je 0x140046686
mov rcx, qword [0x14012adb8]
test rcx, rcx
je 0x14004666c
lea rdx, [0x140105092]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14012ade0], rax
test rax, rax
je 0x140046686
mov rcx, qword [0x14012adb8]
test rcx, rcx
je 0x14004667b
lea rdx, [0x1401053c2]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14012ade8], rax
test rax, rax
je 0x140046686
mov rcx, qword [0x14012adb8]
test rcx, rcx
je 0x140046693
lea rdx, str.SetEntriesInAclA
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
jmp 0x140046695
mov qword [0x14012adc8], 0
xor eax, eax
jmp 0x140046688
mov qword [0x14012add0], 0
xor eax, eax
jmp 0x140046688
mov qword [0x14012add8], 0
xor eax, eax
jmp 0x140046688
mov qword [0x14012ade0], 0
xor eax, eax
jmp 0x140046688
mov qword [0x14012ade8], 0
xor eax, eax
mov byte [0x14012adb1], al
add rsp, 0x28
ret
xor eax, eax
mov qword [0x14012adf0], rax
test rax, rax
setne al
jmp 0x140046688
Function at 0x14004a380
Capabilities:
Link many functions at runtime

Disassembly:
push rsi
push rdi
sub rsp, 0x28
cmp byte [0x14012aec8], 0
jne 0x14004a4ae
lea rcx, str.winspool.drv
call fcn.1400459f0
mov rsi, rax
lea rcx, str.spoolss.dll
call fcn.1400459f0
test rsi, rsi
je 0x14004a451
lea rdx, str.EnumPrintersA
mov rdi, qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rsi
call rdi
mov qword [0x14012aec0], rax
lea rdx, str.OpenPrinterA
mov rcx, rsi
call rdi
mov qword [0x14012ae88], rax
lea rdx, str.ClosePrinter
mov rcx, rsi
call rdi
mov qword [0x14012aeb0], rax
lea rdx, str.StartDocPrinterA
mov rcx, rsi
call rdi
mov qword [0x14012ae90], rax
lea rdx, str.EndDocPrinter
mov rcx, rsi
call rdi
mov qword [0x14012aea8], rax
lea rdx, str.StartPagePrinter
mov rcx, rsi
call rdi
mov qword [0x14012ae98], rax
lea rdx, str.EndPagePrinter
mov rcx, rsi
call rdi
mov qword [0x14012aea0], rax
lea rdx, str.WritePrinter
mov rcx, rsi
call rdi
jmp 0x14004a4a0
mov qword [0x14012aec0], 0
mov qword [0x14012ae88], 0
mov qword [0x14012aeb0], 0
mov qword [0x14012ae90], 0
mov qword [0x14012aea8], 0
mov qword [0x14012ae98], 0
mov qword [0x14012aea0], 0
xor eax, eax
mov qword [0x14012aeb8], rax
mov byte [0x14012aec8], 1
add rsp, 0x28
pop rdi
pop rsi
ret
Function at 0x140055f10
Capabilities:
Get common file path
Set current directory

Disassembly:
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x138
mov ebx, r9d
mov rdi, rdx
mov rsi, rcx
mov rax, qword [0x140127050]
xor rax, rsp
mov qword [rsp + 0x130], rax
test r8b, r8b
je 0x140055f59
lea rdx, [rsp + 0x20]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
add eax, 0xffffffff
cmp eax, 0x103
setb bpl
jmp 0x140055f5b
xor ebp, ebp
mov dword [rdi], 0x88
xor eax, eax
test rsi, rsi
je 0x140055f6f
cmp byte [rsi], 0
cmovne rax, rsi
mov qword [rdi + 0x50], rax
mov rcx, rdi
test bl, bl
je 0x140055f82
call qword [sym.imp.COMDLG32.dll_GetSaveFileNameA]
jmp 0x140055f88
call qword [sym.imp.COMDLG32.dll_GetOpenFileNameA]
mov edi, eax
test rsi, rsi
je 0x140055fac
mov ecx, 0x104
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
add eax, 0xfffffefc
cmp eax, 0xfffffefc
ja 0x140055fac
mov byte [rsi], 0
test bpl, bpl
je 0x140055fbc
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test edi, edi
setne bl
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1400b8300
mov eax, ebx
add rsp, 0x138
pop rbx
pop rbp
pop rdi
pop rsi
ret