joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140021990
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
movzx esi, cl
mov edi, edx
mov ecx, esi
mov ebp, esi
call qword [sym.imp.USER32.dll_GetKeyState]
and al, 1
neg al
sbb ebx, ebx
add ebx, 2
cmp edi, 1
je 0x1400219ca
cmp edi, 2
jne 0x140021abd
cmp ebx, edi
je 0x140021abd
mov ecx, ebp
call qword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x8000
test cx, ax
je 0x140021a04
xor r8d, r8d
xor r9d, r9d
movzx edx, sil
lea ecx, [r8 + 1]
mov dword [rsp + 0x28], 0xffc3d44d
mov byte [rsp + 0x20], r8b
call fcn.14001f820
xor r8d, r8d
xor r9d, r9d
movzx edx, sil
lea ecx, [r8 + 2]
mov dword [rsp + 0x28], 0xffc3d44d
mov byte [rsp + 0x20], r8b
call fcn.14001f820
call qword [sym.imp.USER32.dll_GetForegroundWindow]
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x14012c598]
sete bpl
test bpl, bpl
je 0x140021a65
mov edx, 1
or ecx, 0xffffffff
mov dword [0x140125594], 0
call fcn.140001b60
mov dword [0x140125594], 1
cmp sil, 0x14
jne 0x140021abd
cmp edi, 2
jne 0x140021abd
lea ecx, [rdi + 0x12]
call qword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x140021abd
xor r8d, r8d
xor r9d, r9d
mov dl, reloc.WSOCK32.dll_recv
mov ecx, edi
mov dword [rsp + 0x28], 0xffc3d44d
mov byte [rsp + 0x20], r8b
call fcn.14001f820
test bpl, bpl
je 0x140021abd
lea edx, [rdi - 1]
or ecx, 0xffffffff
mov dword [0x140125594], 0
call fcn.140001b60
mov dword [0x140125594], 1
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x140022330
Capabilities:
Log keystrokes via polling

Disassembly:
sub rsp, 0x28
cmp qword [0x14012ac08], 0
je 0x14002234e
test cl, cl
jne 0x14002234e
movzx eax, byte [0x14012aab1]
add rsp, 0x28
ret
mov qword [rsp + 0x30], rbx
mov ecx, 0xa0
mov qword [rsp + 0x20], rdi
xor bl, bl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
mov edi, 0x8000
test di, ax
mov eax, reloc.WSOCK32.dll_recv
movzx ebx, bl
mov ecx, 0xa1
cmovne ebx, eax
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test di, ax
je 0x14002238b
or bl, 0x20
mov ecx, 0xa2
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test di, ax
je 0x14002239e
or bl, 1
mov ecx, 0xa3
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test di, ax
je 0x1400223b1
or bl, 2
mov ecx, 0xa4
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test di, ax
je 0x1400223c4
or bl, 4
mov ecx, 0xa5
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test di, ax
je 0x1400223d7
or bl, 8
mov ecx, 0x5b
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test di, ax
je 0x1400223ea
or bl, 0x40
mov ecx, 0x5c
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test di, ax
je 0x1400223fd
or bl, 0x80
cmp qword [0x14012ac08], 0
je 0x140022490
movzx edi, bl
not dil
and dil, byte [0x14012aab1]
cmp byte [0x14012aab6], 0
je 0x14002243e
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x14012976c]
cmp eax, 0x14
jae 0x14002243e
movzx eax, byte [0x14012aab6]
not al
and dil, al
test dil, dil
je 0x140022490
movzx edx, byte [0x14012aab3]
movzx eax, dil
lea rcx, [0x14012ab00]
not al
and byte [0x14012aab1], al
and byte [0x14012aab2], al
and dl, al
mov byte [0x14012aab3], dl
call fcn.1400224b0
mov rcx, qword [0x140129900]
test rcx, rcx
je 0x140022490
test byte [rcx + 0xc], dil
mov eax, 0
cmovne rcx, rax
mov qword [0x140129900], rcx
mov rdi, qword [rsp + 0x20]
movzx eax, bl
mov rbx, qword [rsp + 0x30]
add rsp, 0x28
ret

Function at 0x140022890
Capabilities:
Get keyboard layout

Disassembly:
push rbx
sub rsp, 0x70
xor ebx, ebx
test rcx, rcx
je 0x1400228d4
xor edx, edx
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x48
mov ecx, eax
mov ebx, eax
call qword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x1400228d4
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400228d4
xor edx, edx
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ebx, eax
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
add rsp, 0x70
pop rbx
ret
Function at 0x140022ce0
Capabilities:
Get keyboard layout

Disassembly:
push rbx
push rsi
sub rsp, 0x158
movzx esi, cl
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
lea edx, [rsi - 0x41]
mov rbx, rax
cmp dl, 0x19
ja 0x140022e5d
mov qword [rsp + 0x150], rbp
lea rcx, [rsp + 0x40]
xor edx, edx
mov r8d, 0x100
mov qword [rsp + 0x148], rdi
mov qword [rsp + 0x140], r12
call fcn.1400ddb90
xor edi, edi
mov qword [rsp + 0x30], rbx
lea r9, [rsp + 0x180]
lea r8, [rsp + 0x40]
lea ecx, [rdi + 0x6e]
xor edx, edx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov qword [rsp + 0x30], rbx
movzx ebp, di
cmp eax, 2
lea r9, [rsp + 0x180]
lea r8, [rsp + 0x40]
cmove bp, word [rsp + 0x180]
movzx ecx, sil
xor edx, edx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov r12d, eax
test eax, eax
jns 0x140022dc2
mov qword [rsp + 0x30], rbx
lea r9, [rsp + 0x178]
lea r8, [rsp + 0x40]
lea ecx, [rdi + 0x6e]
xor edx, edx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
test bp, bp
je 0x140022e2b
cmp bp, 0xa
jne 0x140022dd2
mov sil, ntohs
jmp 0x140022def
lea rdx, [rsp + 0x170]
mov r9b, 1
mov r8, rbx
movzx ecx, bp
call fcn.140023120
movzx esi, al
test al, al
je 0x140022e2b
movzx edx, byte [rsp + 0x170]
lea rcx, [rsp + 0x40]
call fcn.1400224b0
mov qword [rsp + 0x30], rbx
lea r9, [rsp + 0x178]
lea r8, [rsp + 0x40]
movzx ecx, sil
xor edx, edx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov rbp, qword [rsp + 0x150]
test r12d, r12d
mov r12, qword [rsp + 0x140]
je 0x140022e48
movzx edi, word [rsp + 0x180]
movzx eax, di
mov rdi, qword [rsp + 0x148]
add rsp, 0x158
pop rsi
pop rbx
ret
movzx ecx, sil
mov r8, rax
mov edx, 2
call qword [sym.imp.USER32.dll_MapVirtualKeyExW]
add rsp, 0x158
pop rsi
pop rbx
ret
Function at 0x140022fa0
Capabilities:
Log keystrokes via polling

Disassembly:
push rbp
push r12
sub rsp, 0x38
cmp word [rcx + 2], 0
mov rax, r9
movzx r12d, r8b
mov rbp, rcx
jne 0x140022fde
movzx ecx, word [rcx]
cmp cx, 0xa
jne 0x140022fcc
mov al, 0xd
add rsp, 0x38
pop r12
pop rbp
ret
mov r9b, 1
mov r8, rax
add rsp, 0x38
pop r12
pop rbp
jmp fcn.140023120
mov qword [rsp + 0x58], rbx
movzx ebx, word [rcx]
test ebx, 0xffffff80
jne 0x140023001
mov edx, 2
mov ecx, ebx
call fcn.1400d79f4
test eax, eax
je 0x140023001
and ebx, 0xffffffdf
mov qword [rsp + 0x30], rdi
cmp bx, 0x56
jne 0x140023081
movzx ebx, word [rbp + 2]
test ebx, 0xffffff80
jne 0x14002302b
mov edx, 2
mov ecx, ebx
call fcn.1400d79f4
test eax, eax
je 0x14002302b
and ebx, 0xffffffdf
cmp bx, 0x4b
jne 0x140023081
lea rcx, [rbp + 4]
lea rdx, [rsp + 0x50]
mov r8d, reloc.WSOCK32.dll_recv
call fcn.1400d91d0
mov rcx, qword [rsp + 0x50]
cmp word [rcx], 0
je 0x140023068
mov rbx, qword [rsp + 0x58]
xor edi, edi
movzx eax, dil
mov rdi, qword [rsp + 0x30]
add rsp, 0x38
pop r12
pop rbp
ret
mov rbx, qword [rsp + 0x58]
movzx edi, al
movzx eax, dil
mov rdi, qword [rsp + 0x30]
add rsp, 0x38
pop r12
pop rbp
ret
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r14
lea r14, str.Numpad0
xor edi, edi
lea r13, str.NumpadEnter
mov rbx, r14
mov esi, edi
mov rcx, qword [rbx]
mov rdx, rbp
call fcn.1400d6a7c
test eax, eax
je 0x1400230e8
add rbx, 0x10
inc esi
cmp rbx, r13
jl 0x1400230a5
test r12b, r12b
je 0x1400230c8
xor al, al
jmp 0x1400230f5
xor edx, edx
mov rcx, rbp
call fcn.140022e80
test ax, ax
je 0x1400230e2
movzx ecx, ax
call fcn.140023a10
movzx edi, al
movzx eax, dil
jmp 0x1400230f5
movsxd rax, esi
shl rax, 4
movzx eax, byte [rax + r14 + 8]
mov r13, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x60]
mov r14, qword [rsp + 0x20]
mov rdi, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x58]
add rsp, 0x38
pop r12
pop rbp
ret

Function at 0x140023120
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rbx, rdx
mov rdx, r8
movzx edi, r9b
movzx ebp, cx
call qword [sym.imp.USER32.dll_VkKeyScanExW]
movsx rsi, ax
mov rdx, rsi
shr rdx, 8
cmp dl, 0xff
jne 0x140023199
cmp sil, 0xff
jne 0x140023199
test dil, dil
je 0x1400231b1
movzx edi, bp
test edi, 0xffffff80
jne 0x1400231b1
mov edx, 0x103
mov ecx, edi
call fcn.1400d79f4
test eax, eax
je 0x1400231b1
movzx ecx, bp
call fcn.140014b80
mov edx, 1
mov ecx, edi
movzx esi, al
call fcn.1400d79f4
test eax, eax
setne dl
test dl, 0x38
jne 0x1400231b1
test rbx, rbx
je 0x1400231e5
movzx eax, dl
and al, 6
cmp al, 6
jne 0x1400231b5
or byte [rbx], 8
jmp 0x1400231d5
xor al, al
jmp 0x1400231e9
test dl, 2
je 0x1400231c5
movzx eax, byte [rbx]
test al, 3
jne 0x1400231c5
or al, 1
mov byte [rbx], al
test dl, 4
je 0x1400231d5
movzx eax, byte [rbx]
test al, 0xc
jne 0x1400231d5
or al, 4
mov byte [rbx], al
test dl, 1
je 0x1400231e5
movzx eax, byte [rbx]
test al, 0x30
jne 0x1400231e5
or al, 0x10
mov byte [rbx], al
movzx eax, sil
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140023a10
Capabilities:
Log keystrokes

Disassembly:
push rbx
sub rsp, 0x20
movzx ebx, cx
mov r8d, ebx
mov eax, ebx
cmp ebx, 0x11c
jg 0x140023af6
cmp eax, 0x11c
je 0x140023aee
sub eax, 0x1d
cmp eax, 0x36
ja case.0x140023b1b.286
lea rdx, [0x140000000]
cdqe
movzx eax, byte [rdx + rax + 0x23be8]
mov ecx, dword [rdx + rax*4 + 0x23b9c]
add rcx, rdx
jmp rcx
mov al, 0xa0
add rsp, 0x20
pop rbx
ret
mov al, 0xa2
add rsp, 0x20
pop rbx
ret
mov al, 0xa4
add rsp, 0x20
pop rbx
ret
mov al, 0x6a
add rsp, 0x20
pop rbx
ret
mov al, 0x6d
add rsp, 0x20
pop rbx
ret
mov al, 0x6b
add rsp, 0x20
pop rbx
ret
mov al, 0x2e
add rsp, 0x20
pop rbx
ret
mov al, reloc.WSOCK32.dll_ioctlsocket
add rsp, 0x20
pop rbx
ret
mov al, 0x2d
add rsp, 0x20
pop rbx
ret
mov al, 0x26
add rsp, 0x20
pop rbx
ret
mov al, 0x28
add rsp, 0x20
pop rbx
ret
mov al, 0x25
add rsp, 0x20
pop rbx
ret
mov al, 0x27
add rsp, 0x20
pop rbx
ret
mov al, 0x24
add rsp, 0x20
pop rbx
ret
mov al, reloc.OLEAUT32.dll_SafeArrayAllocDescriptor
add rsp, 0x20
pop rbx
ret
mov al, 0x21
add rsp, 0x20
pop rbx
ret
mov al, SafeArrayAllocDescriptor
add rsp, 0x20
pop rbx
ret
mov al, reloc.WSOCK32.dll_send
add rsp, 0x20
pop rbx
ret
mov al, 0xd
add rsp, 0x20
pop rbx
ret
sub eax, 0x11d
cmp eax, 0x40
ja case.0x140023b1b.286
lea rdx, [0x140000000]
cdqe
movzx eax, byte [rdx + rax + 0x23c48]
mov ecx, dword [rdx + rax*4 + 0x23c20]
add rcx, rdx
jmp rcx
mov al, 0xa1
add rsp, 0x20
pop rbx
ret
mov al, 0xa3
add rsp, 0x20
pop rbx
ret
mov al, 0xa5
add rsp, 0x20
pop rbx
ret
mov al, 0x5b
add rsp, 0x20
pop rbx
ret
mov al, 0x5c
add rsp, 0x20
pop rbx
ret
mov al, 0x90
add rsp, 0x20
pop rbx
ret
mov al, reloc.WSOCK32.dll_WSAGetLastError
add rsp, 0x20
pop rbx
ret
mov al, 0x5d
add rsp, 0x20
pop rbx
ret
mov al, 0x2c
add rsp, 0x20
pop rbx
ret
mov eax, 0x100
test ax, bx
je 0x140023b88
movzx ecx, r8b
mov edx, 1
or ecx, 0xe000
call qword [sym.imp.USER32.dll_MapVirtualKeyW]
test eax, eax
jne 0x140023b96
movzx ecx, bl
mov edx, 1
call qword [sym.imp.USER32.dll_MapVirtualKeyW]
add rsp, 0x20
pop rbx
ret

Function at 0x140023c90
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov dword [0x140129950], ecx
mov edx, 1
lea r8, [0x140129954]
nop word [rax + rax]
mov eax, dword [r8 - 4]
add r8, 4
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul ecx, ecx, 0x6c078965
add ecx, edx
inc edx
mov dword [r8 - 4], ecx
cmp edx, 0x270
jl 0x140023cb0
mov dword [0x140124b24], 1
mov dword [0x14012b784], 1
ret
Function at 0x140023cf0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push rbx
sub rsp, 0x20
cmp dword [0x14012b784], 0
lea rbx, [0x140129950]
jne 0x140023d4f
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, 1
lea r8, [0x140129954]
mov dword [0x140129950], eax
nop
mov eax, dword [r8 - 4]
add r8, 4
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul ecx, ecx, 0x6c078965
add ecx, edx
inc edx
mov dword [r8 - 4], ecx
cmp edx, 0x270
jl 0x140023d20
mov dword [0x14012b784], 1
mov dword [0x140124b24], 0x270
mov qword [0x140129940], rbx
mov r8d, 0xe3
nop word [rax + rax]
mov eax, dword [rbx + 4]
mov ecx, eax
and al, 1
xor ecx, dword [rbx]
and ecx, 0x7ffffffe
xor ecx, dword [rbx]
shr ecx, 1
neg al
sbb eax, eax
add rbx, 4
and eax, 0x9908b0df
xor ecx, eax
xor ecx, dword [rbx + 0x630]
dec r8d
mov dword [rbx - 4], ecx
jne 0x140023d70
mov r8d, 0x18c
nop word [rax + rax]
mov eax, dword [rbx + 4]
lea rdx, [rbx + 4]
mov ecx, eax
and al, 1
xor ecx, dword [rbx]
and ecx, 0x7ffffffe
xor ecx, dword [rbx]
shr ecx, 1
neg al
sbb eax, eax
and eax, 0x9908b0df
xor ecx, eax
xor ecx, dword [rbx - 0x38c]
dec r8d
mov dword [rbx], ecx
mov rbx, rdx
jne 0x140023db0
mov eax, dword [0x140129950]
mov ecx, dword [rdx]
xor ecx, eax
and al, 1
and ecx, 0x7ffffffe
xor ecx, dword [rdx]
shr ecx, 1
neg al
sbb eax, eax
and eax, 0x9908b0df
xor ecx, eax
xor ecx, dword [rdx - 0x38c]
mov dword [rdx], ecx
add rsp, 0x20
pop rbx
ret

Function at 0x140023e20
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 0x28
dec dword [0x140124b24]
jne 0x140023e31
call fcn.140023cf0
mov rax, qword [0x140129940]
add rax, 4
mov ecx, dword [rax - 4]
mov qword [0x140129940], rax
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
add rsp, 0x28
ret

Function at 0x140023e80
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 0x28
dec dword [0x140124b24]
jne 0x140023e91
call fcn.140023cf0
mov rax, qword [0x140129940]
pxor xmm0, xmm0
add rax, 4
mov ecx, dword [rax - 4]
mov qword [0x140129940], rax
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
cvtsi2sd xmm0, rax
mulsd xmm0, qword [0x140112128]
add rsp, 0x28
ret

Function at 0x1400243d0
Capabilities:
Write clipboard data

Disassembly:
sub rsp, 0x38
movzx eax, byte [rcx + 0x23]
test al, al
jne 0x1400243f8
mov rcx, qword [rcx + 0x10]
xor r9d, r9d
or r8, 0xffffffffffffffff
xor edx, edx
mov byte [rsp + 0x20], 1
call fcn.1400bd640
add rsp, 0x38
ret
cmp al, 2
jne 0x14002440e
lea rcx, [0x1400f1524]
xor edx, edx
add rsp, 0x38
jmp fcn.140006da0
cmp qword [0x1401255a0], 2
jae 0x14002443d
cmp qword [rcx + 0x18], 2
jae 0x14002443d
lea r8, [0x1400f1524]
lea rdx, str.Memory_limit_reached__see_MaxMem_in_the_help_file_.
lea rcx, [0x14012c5c0]
add rsp, 0x38
jmp fcn.14004e590
xor r8d, r8d
lea edx, [r8 + 3]
call fcn.1400bdcf0
mov eax, 1
add rsp, 0x38
ret
Function at 0x140024950
Capabilities:
Write clipboard data

Disassembly:
cmp byte [rcx + 0x23], 0
jne 0x14002495a
mov rcx, qword [rcx + 0x10]
cmp byte [rcx + 0x23], 2
jne 0x140024976
cmp qword [0x14012d240], 0
je 0x140024976
lea rcx, [0x14012d228]
jmp fcn.140006f20
and byte [rcx + 0x21], 0x86
movzx eax, byte [rcx + 0x21]
test dl, dl
je 0x140024987
or al, 1
mov byte [rcx + 0x21], al
mov eax, 1
ret
Function at 0x14002a1f0
Capabilities:
Set current directory

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
sub rsp, 0x160
cmp byte [0x14012d40b], 0
mov ebp, r8d
mov esi, edx
mov rdi, rcx
mov dword [rcx + 0xb44], edx
jne 0x14002a453
cmp byte [rcx + 0xbb4], 0
je 0x14002a453
mov rcx, qword [0x14012b628]
mov qword [rax + 8], rbx
mov dword [0x14012e564], r8d
xor r8d, r8d
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], r13
lea edx, [r8 + 1]
call fcn.140001820
lea rcx, [rsp + 0x60]
mov r8d, 0x7f
mov rdx, rax
call fcn.1400da5b4
mov rbx, qword [0x1401255c8]
inc dword [0x14012ac54]
add rbx, 0x150
lea rdx, [0x140129540]
xor r13d, r13d
mov rcx, rbx
mov r8d, 0x150
mov word [rsp + 0x15e], r13w
mov qword [0x1401255c8], rbx
call fcn.1400d7a30
lea rcx, [0x14012c5c0]
xor edx, edx
mov dword [rbx + 0x3c], r13d
call fcn.140029830
cmp dword [0x14012aca0], r13d
mov qword [0x14012d190], r13
je 0x14002a2df
mov rax, qword [0x140127148]
lea rcx, [0x1400f1524]
test rax, rax
je 0x14002a2d9
mov rax, qword [rax]
test rax, rax
cmovne rcx, rax
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rcx, qword [0x14012c4e8]
mov r12d, dword [0x140125594]
mov byte [0x14012d40b], 1
cmp rcx, qword [0x14012c4f0]
mov dword [0x140125594], r13d
jne 0x14002a310
call fcn.140007470
mov rcx, qword [0x14012c4e8]
cmp rcx, qword [0x14012c4e0]
jb 0x14002a32a
mov rax, qword [0x14012cc60]
mov qword [rcx], rax
mov rcx, qword [0x14012c4e8]
add rcx, 0x18
lea rax, str.OnExit
mov bl, 1
mov qword [0x14012c4e8], rcx
mov qword [rcx + 8], rax
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov rcx, qword [rdi + 0xb30]
mov byte [0x1401276a4], r13b
test rcx, rcx
je 0x14002a373
call fcn.140001930
test eax, eax
je 0x14002a373
cmp byte [0x1401276a4], r13b
movzx ebx, bl
cmove ebx, r13d
mov byte [0x1401276a4], 1
test bl, bl
je 0x14002a3d0
mov dword [rsp + 0x30], r13d
call fcn.140076300
mov r9d, r13d
cmp qword [rdi + 0xb30], r9
mov qword [rsp + 0x20], rax
movsxd rax, dword [0x14012e564]
lea rcx, [rdi + 0xae0]
lea rdx, [rsp + 0x20]
sete r9b
mov r8d, 2
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x50], 1
call fcn.1400b3a10
movzx ebx, bl
cmp eax, 3
cmove ebx, r13d
mov rax, qword [0x14012c4e8]
mov r13, qword [rsp + 0x190]
sub rax, 0x18
cmp rax, qword [0x14012c4e0]
mov qword [0x14012c4e8], rax
jb 0x14002a404
mov rax, qword [rax]
mov qword [0x14012c508], rax
mov qword [0x14012cc60], rax
test bl, bl
mov rbx, qword [rsp + 0x180]
mov byte [0x14012d40b], 0
jne 0x14002a445
cmp esi, 0xffffffff
jle 0x14002a445
lea rcx, [rsp + 0x60]
call fcn.140004f80
mov dword [0x140125594], r12d
mov r12, qword [rsp + 0x188]
mov eax, 8
add rsp, 0x160
pop rdi
pop rsi
pop rbp
ret
mov r8d, ebp
mov edx, esi
mov rcx, rdi
call fcn.14002a4a0
int3
cmp byte [0x1401276a4], 0
jne 0x14002a491
cmp edx, 6
jne 0x14002a491
mov rax, qword [0x14012a9f0]
mov ecx, dword [0x14012e564]
mov byte [0x1401276a4], 1
cmp word [rax], 0
lea eax, [rdx + 2]
cmovne ecx, r8d
mov dword [0x14012e564], ecx
add rsp, 0x160
pop rdi
pop rsi
pop rbp
ret
call fcn.14002a4a0
int3
Function at 0x140039bc0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x450
mov rbx, rdx
mov rdx, qword [rcx + 0xb88]
mov rsi, rcx
lea r8, str.Lib_
mov rcx, rbx
call fcn.140039ca0
lea rdx, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x20], rdx
lea edx, [r9 + 5]
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
xor edx, edx
test eax, eax
je 0x140039c15
mov word [rsp + 0x30], dx
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x30]
repne scasw ax, word [rdi]
not rcx
dec rcx
je 0x140039c40
cmp word [rsp + rcx*2 + 0x2e], 0x5c
jne 0x140039c40
mov word [rsp + rcx*2 + 0x2e], dx
nop dword [rax + rax]
movzx eax, word [rsp + rdx + 0x30]
add rdx, 2
mov word [rsp + rdx + 0x23e], ax
test ax, ax
jne 0x140039c40
lea rcx, [rbx + 0x10]
lea r8, str.AutoHotkeyLib_
lea rdx, [rsp + 0x240]
call fcn.140039ca0
mov rdx, qword [rsi + 0xba0]
lea rcx, [rbx + 0x20]
lea r8, str.Lib_
call fcn.140039ca0
lea r11, [rsp + 0x450]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret

Function at 0x140039ca0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rdi
mov eax, 0x10040
call fcn.1400e0a90
sub rsp, rax
mov rbx, rcx
mov qword [rsp + 0x20], r8
mov r9, rdx
lea r8, [0x1400fb008]
lea rcx, [rsp + 0x30]
mov edx, 0x8001
call fcn.1400b9310
lea rcx, [rsp + 0x30]
movsxd rdi, eax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140039d31
test al, 0x10
je 0x140039d31
lea ecx, [rdi + 0xfd]
movsxd rcx, ecx
lea rcx, [rcx + rcx + 0xa]
call fcn.1400b60a0
mov rcx, rax
mov qword [rbx], rax
test rax, rax
je 0x140039d31
lea eax, [rdi + 1]
lea rdx, [rsp + 0x30]
movsxd r8, eax
add r8, r8
call fcn.1400d7a30
mov qword [rbx + 8], rdi
mov rbx, qword [rsp + 0x10050]
add rsp, 0x10040
pop rdi
ret
lea rax, [0x1400f1524]
mov qword [rbx], rax
mov rbx, qword [rsp + 0x10050]
add rsp, 0x10040
pop rdi
ret
Function at 0x140039d50
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rdi
push r13
sub rsp, 0x258
cmp qword [0x14012d410], 0
mov rax, qword [rsp + 0x290]
mov r13, rdx
mov rdi, r8
mov byte [r9], 0
lea rdx, [0x14012d410]
mov byte [rax], 0
jne 0x140039d9b
call fcn.140039bc0
lea rdx, [0x14012d410]
test rdi, rdi
jne 0x140039dbd
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
mov qword [rsp + 0x280], rcx
xor eax, eax
cmp rdi, 0xfd
ja 0x140039ff7
mov qword [rsp + 0x278], rbx
mov qword [rsp + 0x250], rbp
mov qword [rsp + 0x248], rsi
mov qword [rsp + 0x240], r12
mov qword [rsp + 0x238], r14
mov qword [rsp + 0x230], r15
mov r15, r13
mov r12, rdi
mov r14d, eax
nop word [rax + rax]
mov ebp, eax
mov rsi, rdx
mov rcx, qword [rsi]
cmp word [rcx], 0
je 0x140039e73
mov rax, qword [rsi + 8]
lea rbx, [r12 + r12]
mov rdx, r15
lea rdi, [rcx + rax*2]
mov r8, rbx
mov rcx, rdi
call fcn.1400d7a30
mov rax, rdi
lea rdi, str..ahk
sub rbx, rdi
mov rcx, rdi
lea rdx, [rbx + rax]
nop dword [rax]
movzx eax, word [rcx]
add rcx, 2
mov word [rdx + rcx - 2], ax
test ax, ax
jne 0x140039e50
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140039e73
test al, 0x10
je 0x140039ee3
inc ebp
add rsi, 0x10
cmp ebp, 3
jl 0x140039e15
mov edx, 0x5f
mov rcx, r13
call fcn.1400d7d64
mov r12, rax
test rax, rax
je 0x140039fc5
sub r12, r13
sar r12, 1
cmp r12, 0xfe
jae 0x140039fc5
lea rdi, [r12 + r12]
lea rcx, [rsp + 0x30]
mov rdx, r13
mov r8, rdi
lea r15, [rsp + 0x30]
call fcn.1400d7a30
xor eax, eax
inc r14d
mov word [rsp + rdi + 0x30], ax
cmp r14d, 2
jge 0x140039fc5
lea rdx, [0x14012d410]
jmp 0x140039e10
mov rax, qword [rsp + 0x290]
lea r14, [0x14012d410]
movsxd rsi, ebp
add rsi, rsi
xor r15d, r15d
mov byte [rax], 1
mov rbx, qword [r14 + rsi*8 + 8]
mov rdi, qword [r14 + rsi*8]
mov word [rdi + rbx*2 - 2], r15w
mov rcx, qword [r14 + rsi*8]
call fcn.140070c90
mov r12, qword [rsp + 0x270]
mov r11d, 0x5c
mov word [rdi + rbx*2 - 2], r11w
mov rcx, qword [r12 + 0xbc0]
test rcx, rcx
je 0x140039f5b
cmp byte [rsp + 0x298], r15b
je 0x140039f5b
mov r9, qword [r14 + rsi*8]
mov r8, qword [r14 + rsi*8 + 8]
lea rdx, str.Include___0.s_nIncludeAgain__s_n
mov qword [rsp + 0x20], r9
call fcn.1400284e0
mov r8, qword [r14 + rsi*8]
mov ebp, dword [0x14012c41c]
lea rdx, [rsp + 0x290]
xor r9d, r9d
mov rcx, r12
mov qword [rsp + 0x290], r15
mov byte [rsp + 0x20], r15b
call fcn.14002aea0
mov rdi, qword [rsp + 0x290]
mov ebx, eax
cmp eax, 3
jne 0x140039fa4
mov r8d, ebp
mov rdx, rdi
mov rcx, r12
call fcn.14002b320
mov ebx, eax
test rdi, rdi
je 0x140039fb6
mov rax, qword [rdi]
mov edx, 1
mov rcx, rdi
call qword [rax]
test ebx, ebx
jne 0x14003a002
mov rax, qword [rsp + 0x288]
mov byte [rax], 1
xor eax, eax
mov r14, qword [rsp + 0x238]
mov r12, qword [rsp + 0x240]
mov rsi, qword [rsp + 0x248]
mov rbp, qword [rsp + 0x250]
mov rbx, qword [rsp + 0x278]
mov r15, qword [rsp + 0x230]
add rsp, 0x258
pop r13
pop rdi
ret
mov r8, qword [rsp + 0x280]
xor r9d, r9d
mov rdx, r13
mov rcx, r12
call fcn.14003a020
jmp 0x140039fc7