joyce8/EMBER2024-capa huggingface dataset:
Function at 0x42f180
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r13
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
mov esi, edx
xor rdi, rdi
mov rcx, rbx
call fcn.00411550
mov rcx, rax
call sub.kernel32.dll_GetFileAttributesW
mov r13d, eax
cmp r13d, 0xffffffff
je 0x42f28c
mov eax, r13d
test eax, 0x400
jne 0x42f1ca
test r13d, 0x10
setne dil
jmp 0x42f2bf
test sil, sil
je 0x42f22a
mov rcx, rbx
call fcn.00411550
mov rcx, rax
mov edx, 0x80000000
mov r8d, 1
xor r9, r9
mov dword [rsp + 0x20], 3
mov dword [rsp + 0x28], 0x2000000
mov qword [rsp + 0x30], 0
call sub.kernel32.dll_CreateFileW_1
cmp rax, 0xffffffffffffffff
je 0x42f2bf
mov rcx, rax
call sub.kernel32.dll_CloseHandle_1
test r13d, 0x10
setne dil
jmp 0x42f2bf
test r13d, 0x10
je 0x42f23b
mov dil, 1
jmp 0x42f2bf
mov rcx, rbx
call fcn.00411550
mov rcx, rax
mov edx, 0x80000000
mov r8d, 1
xor r9, r9
mov dword [rsp + 0x20], 3
mov dword [rsp + 0x28], 0x2000000
mov qword [rsp + 0x30], 0
call sub.kernel32.dll_CreateFileW_1
cmp rax, 0xffffffffffffffff
je 0x42f287
mov rcx, rax
call sub.kernel32.dll_CloseHandle_1
xor rdi, rdi
jmp 0x42f2bf
mov dil, 1
jmp 0x42f2bf
call sub.kernel32.dll_GetLastError_2
cmp eax, 2
je 0x42f2b7
cmp eax, 3
je 0x42f2b7
cmp eax, 0xa1
je 0x42f2b7
cmp eax, 0x7b
je 0x42f2b7
cmp eax, 0x35
je 0x42f2b7
cmp eax, 0x15
je 0x42f2b7
cmp eax, 0x43
jne 0x42f2bc
xor rdi, rdi
jmp 0x42f2bf
mov dil, 1
mov eax, edi
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop r13
ret

Function at 0x42f2d0
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rcx, rbx
call fcn.00411550
mov rcx, rax
call sub.kernel32.dll_DeleteFileW
test eax, eax
setne sil
test sil, sil
jne 0x42f342
call sub.kernel32.dll_GetLastError_2
mov edi, eax
mov rcx, rbx
call fcn.00411550
mov rcx, rax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x42f33b
mov ecx, eax
test ecx, 0x400
je 0x42f33b
test eax, 0x10
je 0x42f33b
mov rcx, rbx
call fcn.00411550
mov rcx, rax
call sub.kernel32.dll_RemoveDirectoryW
test eax, eax
setne sil
jmp 0x42f342
mov ecx, edi
call sub.kernel32.dll_SetLastError
mov eax, esi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x436710
Capabilities:
Get geographical location

Disassembly:
push rbp
push rbx
sub rsp, 0x38
mov rbp, rsp
mov ebx, r8d
lea r8, [rbp + 0x2c]
mov r9d, 2
call sub.kernel32.dll_GetLocaleInfoW_1
test eax, eax
jle 0x436737
movzx rax, word [rbp + 0x2c]
jmp 0x436739
mov eax, ebx
lea rsp, [rbp + 0x38]
pop rbx
pop rbp
ret
Function at 0x4381d0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0x8e0
mov rbp, rsp
mov qword [rbp + 0x40], rcx
mov qword [rbp + 0x48], rdx
mov qword [rbp + 0x58], 0
nop
mov rcx, qword [rbp + 0x40]
mov rdx, qword [rbp + 0x48]
lea r8, [rbp + 0x60]
mov r9d, 0x400
call fcn.00437f80
mov ebx, eax
mov rax, qword [0x005d1e80]
cmp byte [rax], 0
je 0x438308
mov rcx, qword [0x005d1aa0]
call fcn.0040b670
call fcn.004095d0
mov ecx, 1
xor rdx, rdx
lea r8, [rbp + 0x60]
mov r9d, ebx
mov qword [rsp + 0x20], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
call sub.kernel32.dll_WideCharToMultiByte_1
mov esi, eax
lea rcx, [rbp + 0x58]
mov rdx, qword [0x00438190]
mov r8d, 1
movsxd r9, esi
call fcn.00413620
mov ecx, 1
xor rdx, rdx
lea r8, [rbp + 0x60]
mov r9d, ebx
mov rax, qword [rbp + 0x58]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
call sub.kernel32.dll_WideCharToMultiByte_1
mov ecx, 0xfffffff4
call sub.kernel32.dll_GetStdHandle_1
mov rcx, rax
mov rdx, qword [rbp + 0x58]
mov r8d, esi
lea r9, [rbp + 0x54]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile_1
mov ecx, 0xfffffff4
call sub.kernel32.dll_GetStdHandle_1
mov rcx, rax
lea rdx, [0x0043839c]
mov r8d, 2
lea r9, [rbp + 0x54]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile_1
jmp 0x43834e
mov rcx, qword [0x005d91e0]
call fcn.00413e10
mov rcx, rax
mov rax, qword [0x005d1a10]
mov edx, dword [rax + 8]
lea r8, [rbp + 0x860]
mov r9d, 0x40
call sub.user32.dll_LoadStringW_1
xor rcx, rcx
lea rdx, [rbp + 0x60]
lea r8, [rbp + 0x860]
mov r9d, 0x2010
call sub.user32.dll_MessageBoxW
nop
lea rcx, [rbp + 0x58]
mov rdx, qword [0x00438190]
call fcn.00413820
lea rsp, [rbp + 0x8e0]
pop rbx
pop rsi
pop rbp
ret
Function at 0x439f20
Capabilities:
Get file version info

Disassembly:
push rbp
sub rsp, 0x70
mov rbp, rsp
mov qword [rbp + 0x58], 0
mov qword [rbp + 0x28], rbp
mov qword [rbp + 0x80], rcx
mov qword [rbp + 0x88], rdx
mov qword [rbp + 0x90], r8
mov qword [rbp + 0x98], r9
nop
mov byte [rbp + 0x67], 0
lea rcx, [rbp + 0x58]
mov rdx, qword [rbp + 0x80]
call fcn.00410910
lea rcx, [rbp + 0x58]
call fcn.00410b60
mov rcx, qword [rbp + 0x58]
call fcn.00411550
mov rcx, rax
lea rdx, [rbp + 0x50]
call sub.version.dll_GetFileVersionInfoSizeW
mov dword [rbp + 0x54], eax
cmp dword [rbp + 0x54], 0
je 0x43a030
mov ecx, dword [rbp + 0x54]
call fcn.00409290
mov qword [rbp + 0x68], rax
nop
mov rcx, qword [rbp + 0x58]
call fcn.00411550
mov rcx, rax
mov edx, dword [rbp + 0x50]
mov r8d, dword [rbp + 0x54]
mov r9, qword [rbp + 0x68]
call sub.version.dll_GetFileVersionInfoW
test eax, eax
je 0x43a026
mov rcx, qword [rbp + 0x68]
lea rdx, [0x0043a088]
lea r8, [rbp + 0x48]
lea r9, [rbp + 0x44]
call sub.version.dll_VerQueryValueW
test eax, eax
je 0x43a026
mov rax, qword [rbp + 0x48]
mov eax, dword [rax + 0x10]
mov dword [rbp + 0x40], eax
mov rax, qword [rbp + 0x88]
mov ecx, dword [rbp + 0x40]
shr ecx, 0x10
movzx ecx, cx
mov dword [rax], ecx
mov rax, qword [rbp + 0x90]
mov rcx, qword [rbp + 0x48]
movzx ecx, word [rcx + 0x10]
mov dword [rax], ecx
mov rax, qword [rbp + 0x48]
mov eax, dword [rax + 0x14]
mov dword [rbp + 0x3c], eax
mov rax, qword [rbp + 0x98]
mov ecx, dword [rbp + 0x3c]
shr ecx, 0x10
movzx ecx, cx
mov dword [rax], ecx
mov byte [rbp + 0x67], 1
nop
mov rcx, qword [rbp + 0x68]
call fcn.004092c0
nop
lea rcx, [rbp + 0x58]
call fcn.00410260
movzx rax, byte [rbp + 0x67]
lea rsp, [rbp + 0x70]
pop rbp
ret

Function at 0x43b390
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r13
push rdi
push rsi
push rbx
sub rsp, 0x240
mov rbp, rsp
mov rbx, rcx
mov rcx, rbx
call fcn.00410a40
mov r13d, eax
mov ecx, 0xfde9
xor rdx, rdx
mov r8, rbx
mov r9d, r13d
mov qword [rsp + 0x20], 0
mov dword [rsp + 0x28], 0
call fcn.00417980
mov esi, eax
cmp esi, 0x104
jbe 0x43b3ed
mov ecx, esi
add ecx, ecx
mov ecx, ecx
call fcn.00409290
mov rdi, rax
jmp 0x43b3f1
lea rdi, [rbp + 0x38]
mov ecx, 0xfde9
xor rdx, rdx
mov r8, rbx
mov r9d, r13d
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], esi
call fcn.00417980
mov rcx, rdi
call sub.user32.dll_CharUpperW
xor rbx, rbx
xor rax, rax
mov ecx, esi
sub ecx, 1
cmp eax, ecx
jg 0x43b444
add ecx, 1
mov edx, ebx
shl edx, 5
shr ebx, 0x1b
or edx, ebx
mov ebx, edx
movsxd rdx, eax
movzx edx, word [rdi + rdx*2]
xor ebx, edx
add eax, 1
cmp eax, ecx
jne 0x43b428
nop
lea rax, [rbp + 0x38]
cmp rdi, rax
je 0x43b456
mov rcx, rdi
call fcn.004092c0
mov eax, ebx
lea rsp, [rbp + 0x240]
pop rbx
pop rsi
pop rdi
pop r13
pop rbp
ret
Function at 0x4bd4e0
Capabilities:
Encode data using xor

Disassembly:
mov al, 0xb5
mov r8, rcx
xor rdx, rdx
mov ecx, edx
and ecx, 0x3f
mov r9, r8
shr r9, cl
and r9b, 0xff
xor al, r9b
add edx, 1
cmp edx, 8
jne 0x4bd4e8
nop
ret

Function at 0x506c40
Capabilities:
Resume thread

Disassembly:
push rbp
sub rsp, 0x40
mov rbp, rsp
mov qword [rbp + 0x20], rcx
mov byte [rbp + 0x2f], dl
mov qword [rbp + 0x30], 0
mov qword [rbp + 0x38], 0
nop
mov rax, qword [rbp + 0x20]
cmp byte [rax + 0x19], 0
jne 0x506c73
movzx rax, byte [rbp + 0x2f]
test al, al
je 0x506cd1
mov rax, qword [rbp + 0x20]
cmp byte [rax + 0x1d], 0
jne 0x506cd1
mov rax, qword [rbp + 0x20]
cmp byte [rax + 0x68], 0
jne 0x506cd1
mov rax, qword [rbp + 0x20]
mov byte [rax + 0x1b], 0
mov byte [rax + 0x19], 0
mov rax, qword [rbp + 0x20]
mov rcx, qword [rax + 0x10]
call sub.kernel32.dll_ResumeThread
cmp eax, 1
je 0x506cfb
lea rcx, [rbp + 0x38]
mov rdx, qword [0x005d1dd8]
call fcn.004178b0
mov rcx, qword [0x004d2770]
mov dl, 1
mov r8, qword [rbp + 0x38]
call fcn.004383c0
mov rcx, rax
call fcn.0040f510
jmp 0x506cfb
lea rcx, [rbp + 0x30]
mov rdx, qword [0x005d1dd8]
call fcn.004178b0
mov rcx, qword [0x004d2770]
mov dl, 1
mov r8, qword [rbp + 0x30]
call fcn.004383c0
mov rcx, rax
call fcn.0040f510
nop
lea rcx, [rbp + 0x30]
mov edx, 2
call fcn.00410340
lea rsp, [rbp + 0x40]
pop rbp
ret

Function at 0x507ab0
Capabilities:
Suspend thread

Disassembly:
push rbp
sub rsp, 0x40
mov rbp, rsp
mov qword [rbp + 0x28], rbp
mov qword [rbp + 0x50], rcx
mov rax, qword [rbp + 0x50]
movzx rax, byte [rax + 0x1b]
mov byte [rbp + 0x3f], al
nop
mov rax, qword [rbp + 0x50]
mov byte [rax + 0x1b], 1
mov rax, qword [rbp + 0x50]
mov rcx, qword [rax + 0x10]
call sub.kernel32.dll_SuspendThread
mov rcx, qword [rbp + 0x50]
test eax, eax
setge dl
call fcn.00506a80
jmp 0x507b0b
lea rsp, [rbp + 0x40]
pop rbp
ret

Function at 0x507b30
Capabilities:
Resume thread

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
mov rcx, qword [rbx + 0x10]
call sub.kernel32.dll_ResumeThread
mov esi, eax
mov rcx, rbx
test esi, esi
setge dl
call fcn.00506a80
cmp esi, 1
jne 0x507b5a
mov byte [rbx + 0x1b], 0
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x57c7e0
Capabilities:
Get file size

Disassembly:
push rbp
sub rsp, 0x50
mov rbp, rsp
mov qword [rbp + 0x38], rbp
mov qword [rbp + 0x60], rcx
mov rax, qword [rbp + 0x60]
mov rcx, qword [rax + 0x18]
mov edx, 0x20
call fcn.0042e870
mov dword [rbp + 0x4c], eax
nop
cmp dword [rbp + 0x4c], 0xffffffff
jne 0x57c830
mov rax, qword [rbp + 0x60]
mov rax, qword [rax + 0x18]
mov qword [rbp + 0x28], rax
mov byte [rbp + 0x30], 0x11
lea rcx, [0x0057c9ac]
lea rdx, [rbp + 0x28]
xor r8, r8
call fcn.0057c1a0
movsxd rcx, dword [rbp + 0x4c]
xor rdx, rdx
call sub.kernel32.dll_GetFileSize_1
mov rcx, qword [rbp + 0x60]
mov dword [rcx + 0x10], eax
mov rax, qword [rbp + 0x60]
cmp dword [rax + 0x10], 0xffffffff
jne 0x57c870
mov rax, qword [rbp + 0x60]
mov rax, qword [rax + 0x18]
mov qword [rbp + 0x28], rax
mov byte [rbp + 0x30], 0x11
lea rcx, [0x0057c9e0]
lea rdx, [rbp + 0x28]
xor r8, r8
call fcn.0057c1a0
mov rax, qword [rbp + 0x60]
cmp dword [rax + 0x10], 0
jne 0x57c89d
mov rax, qword [rbp + 0x60]
mov rax, qword [rax + 0x18]
mov qword [rbp + 0x28], rax
mov byte [rbp + 0x30], 0x11
lea rcx, [0x0057ca48]
lea rdx, [rbp + 0x28]
xor r8, r8
call fcn.0057c1a0
nop
mov rax, qword [rbp + 0x60]
mov ecx, dword [rax + 0x10]
call fcn.00409290
mov rcx, qword [rbp + 0x60]
mov qword [rcx + 8], rax
movsxd rcx, dword [rbp + 0x4c]
mov rax, qword [rbp + 0x60]
mov rdx, qword [rax + 8]
mov rax, qword [rbp + 0x60]
mov r8d, dword [rax + 0x10]
call fcn.0042eca0
mov dword [rbp + 0x48], eax
cmp dword [rbp + 0x48], 0xffffffff
jne 0x57c8f7
mov rax, qword [rbp + 0x60]
mov rax, qword [rax + 0x18]
mov qword [rbp + 0x28], rax
mov byte [rbp + 0x30], 0x11
lea rcx, [0x0057ca78]
lea rdx, [rbp + 0x28]
xor r8, r8
call fcn.0057c1a0
mov rax, qword [rbp + 0x60]
mov eax, dword [rax + 0x10]
cmp eax, dword [rbp + 0x48]
je 0x57c954
mov rax, qword [rbp + 0x60]
mov rax, qword [rax + 0x18]
mov qword [rbp + 0x28], rax
mov byte [rbp + 0x30], 0x11
lea rcx, [0x0057cab8]
lea rdx, [rbp + 0x28]
xor r8, r8
call fcn.0057c1a0
jmp 0x57c954
nop
cmp dword [rbp + 0x4c], 0xffffffff
je 0x57c964
movsxd rcx, dword [rbp + 0x4c]
call sub.kernel32.dll_CloseHandle_1
lea rsp, [rbp + 0x50]
pop rbp
ret

Function at 0x57f500
Capabilities:
Encode data using xor

Disassembly:
xor rax, rax
test r8d, r8d
je 0x57f52b
sub r8d, 1
mov ecx, eax
shr ecx, 0x1e
and ecx, 3
add eax, eax
add eax, eax
or ecx, eax
mov eax, ecx
movsx rcx, byte [rdx]
xor eax, ecx
add rdx, 1
test r8d, r8d
jne 0x57f508
nop
ret

Function at 0x581300
Capabilities:
Get file size

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov ebx, edx
movsxd rcx, ebx
xor rdx, rdx
mov r8d, 1
call fcn.0042ed80
mov esi, eax
movsxd rcx, ebx
xor rdx, rdx
call sub.kernel32.dll_GetFileSize_1
cmp esi, eax
sete al
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x582440
Capabilities:
Encode data using xor

Disassembly:
mov eax, r9d
test r8d, r8d
je 0x58246b
sub r8d, 1
mov ecx, eax
shr ecx, 0x1e
and ecx, 3
add eax, eax
add eax, eax
or ecx, eax
mov eax, ecx
movsx rcx, byte [rdx]
xor eax, ecx
add rdx, 1
test r8d, r8d
jne 0x582448
nop
ret
Function at 0x582860
Capabilities:
Get common file path

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rdx
mov rcx, rbx
mov edx, 0x104
call fcn.004117b0
mov rcx, qword [rbx]
call fcn.00411550
mov ecx, 0x104
mov rdx, rax
call sub.kernel32.dll_GetTempPathW
mov rcx, qword [rbx]
call fcn.00411550
mov rsi, rax
mov rcx, qword [rbx]
call fcn.00411550
mov rcx, rsi
lea rdx, [0x005828e4]
xor r8, r8
mov r9, rax
call sub.kernel32.dll_GetTempFileNameW
test eax, eax
jne 0x5828c5
lea rcx, [0x005828f4]
call fcn.0057c170
mov rcx, qword [rbx]
call fcn.00411550
mov rcx, rbx
mov rdx, rax
call fcn.004115f0
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x140027cb4
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.14001babc
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001babc
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140027e04
cmp rax, 0xffffffffffffffff
je 0x140027e04
xor edi, edi
test rbp, rbp
jle 0x140027daf
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14001e0e0
mov rbx, rax
test rax, rax
jne 0x140027d3c
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140027da5
mov edx, 0x8000
mov ecx, r14d
call fcn.140015690
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.14001c7bc
cmp eax, 0xffffffff
je 0x140027d85
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140027d4c
mov edx, r15d
mov ecx, r14d
call fcn.140015690
jmp 0x140027da5
cmp byte [rsi + 0x38], dil
je 0x140027d9c
cmp dword [rsi + 0x34], 5
jne 0x140027d9c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140027da5
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14001a168
jmp 0x140027e18
jns 0x140027e18
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001babc
cmp rax, 0xffffffffffffffff
jne 0x140027dd0
cmp byte [rsi + 0x30], dil
je 0x140027e18
mov edi, dword [rsi + 0x2c]
jmp 0x140027e18
mov ecx, r14d
call fcn.140016c88
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140027e18
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x140027e18
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140027e11
mov eax, dword [rsi + 0x2c]
jmp 0x140027e16
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001babc
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x100004828
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
cmp rcx, rdx
je 0x100004875
cmp rcx, 0xffffffffffffffff
je 0x100004875
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x10000486d
cmp dword [rcx + 0x3c], edx
jl 0x10000486d
cmp dword [rcx + 0x3c], 0x10000000
jae 0x10000486d
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp], rax
cmp dword [rax], 0x4550
cmovne rax, rdx
mov rdx, rax
mov qword [rsp], rax
jmp 0x100004875
mov rax, rdx
add rsp, 0x18
ret
Function at 0x140002fa0
Capabilities:
Delete service

Disassembly:
push rbx
sub rsp, 0x140
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x130], rax
call fcn.140002d00
mov rcx, qword [0x140010040]
cmp rcx, 0xffffffffffffffff
je 0x140002fde
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x140010040], 0xffffffffffffffff
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rbx, rax
test rax, rax
je 0x1400030ea
mov r8d, 0xf01ff
mov qword [rsp + 0x150], rdi
lea rdx, str.PDFWKRNL
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rdi, rax
test rax, rax
je 0x1400030d4
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x1400030cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.ERROR:_RemoveDriver:DeleteService_Failed:_0x_x____n
lea rcx, [rsp + 0x30]
call fcn.140001960
mov eax, 2
cmp ax, word [0x140010048]
jb 0x140003067
lea rcx, [rsp + 0x30]
call fcn.1400038e0
movzx ecx, word [0x14009a5ac]
test cx, cx
je 0x1400030cb
mov eax, 1
lea rdx, str...USBCPDFW.LOG
cmp ax, cx
lea rcx, [rsp + 0x20]
jne 0x14000309f
lea r8, [0x14000daf8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
inc word [0x14009a5ac]
jmp 0x1400030ac
lea r8, [0x14000db10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x1400030cb
lea rdx, [rsp + 0x30]
call fcn.140009b30
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x150]
jmp 0x140003180
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.ERROR:_RemoveDriver:OpenSCManager_Failed:_0x_x____n
lea rcx, [rsp + 0x30]
call fcn.140001960
mov eax, 2
cmp ax, word [0x140010048]
jb 0x14000311c
lea rcx, [rsp + 0x30]
call fcn.1400038e0
movzx ecx, word [0x14009a5ac]
test cx, cx
je 0x140003180
mov eax, 1
lea rdx, str...USBCPDFW.LOG
cmp ax, cx
lea rcx, [rsp + 0x20]
jne 0x140003154
lea r8, [0x14000daf8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
inc word [0x14009a5ac]
jmp 0x140003161
lea r8, [0x14000db10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x140003180
lea rdx, [rsp + 0x30]
call fcn.140009b30
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.140009c20
add rsp, 0x140
pop rbx
ret
Function at 0x140004e80
Capabilities:
Get system firmware table

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x30
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov esi, r8d
mov ebp, edx
mov r14d, ecx
xor r8d, r8d
mov edx, 0x4746434d
mov ecx, 0x41435049
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_GetSystemFirmwareTable]
mov ebx, eax
test eax, eax
jne 0x140004f4a
mov eax, 2
cmp ax, word [0x140010048]
jb 0x140004ee7
lea rcx, str.ERROR:_GetSystemFirmwareTalbe_Have_Size0____n
call fcn.1400038e0
movzx ecx, word [0x14009a5ac]
test cx, cx
je 0x140004fdf
mov eax, 1
lea rdx, str...USBCPDFW.LOG
cmp ax, cx
lea rcx, [rsp + 0x20]
jne 0x140004f23
lea r8, [0x14000daf8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
inc word [0x14009a5ac]
jmp 0x140004f30
lea r8, [0x14000db10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x140004fdf
lea rdx, str.ERROR:_GetSystemFirmwareTalbe_Have_Size0____n
jmp 0x140004fcf
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x140004fe3
mov eax, 2
cmp ax, word [0x140010048]
jb 0x140004f79
lea rcx, str.ERROR:_GetSystemFirmwareTable_Allocate_Buffer_Failed____n
call fcn.1400038e0
movzx ecx, word [0x14009a5ac]
test cx, cx
je 0x140004fdf
mov eax, 1
lea rdx, str...USBCPDFW.LOG
cmp ax, cx
lea rcx, [rsp + 0x20]
jne 0x140004fb1
lea r8, [0x14000daf8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
inc word [0x14009a5ac]
jmp 0x140004fbe
lea r8, [0x14000db10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x140004fdf
lea rdx, str.ERROR:_GetSystemFirmwareTable_Allocate_Buffer_Failed____n
call fcn.140009b30
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor eax, eax
jmp 0x140005020
mov r9d, ebx
mov r8, rdi
mov edx, 0x4746434d
mov ecx, 0x41435049
call qword [sym.imp.KERNEL32.dll_GetSystemFirmwareTable]
mov rbx, qword [rdi + 0x2c]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
movzx eax, r14b
and ebp, 0x1f
shl eax, 5
and esi, 7
or eax, ebp
shl eax, 3
or eax, esi
shl eax, 0xc
add rax, rbx
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140009c20
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x30
pop r14
ret
Function at 0x140005050
Capabilities:
Enumerate system firmware tables

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov r12d, r8d
mov r13, rdx
mov r14, rcx
xor r8d, r8d
xor edx, edx
mov ecx, 0x41435049
xor r15b, r15b
xor bpl, bpl
call qword [sym.imp.KERNEL32.dll_EnumSystemFirmwareTables]
mov esi, eax
test eax, eax
je 0x1400051ab
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x140005131
mov r8d, esi
mov rdx, rax
mov ecx, 0x41435049
call qword [sym.imp.KERNEL32.dll_EnumSystemFirmwareTables]
mov ecx, eax
shr ecx, 2
mov eax, ecx
shl rax, 2
cmp rax, rsi
ja 0x1400050e9
test ecx, ecx
je 0x1400050e9
dec ecx
cmp dword [rbx + rcx*4], 0x4746434d
je 0x1400050e6
test ecx, ecx
jne 0x1400050d5
jmp 0x1400050e9
mov bpl, 1
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test bpl, bpl
je 0x14000522b
mov r8d, dword [r14 + 8]
mov edx, dword [r14 + 4]
mov ecx, dword [r14]
call fcn.140004e80
test rax, rax
je 0x14000522b
mov r9d, r12d
lea rdx, [fcn.1400031a0]
mov r8, rax
mov rcx, r13
call fcn.140004cb0
mov r15b, 1
jmp 0x14000522b
mov eax, 2
cmp ax, word [0x140010048]
jb 0x14000514b
lea rcx, str.ERROR:_EnumSystemFirmwareTable_Allocate_Buffer_Failed____n
call fcn.1400038e0
movzx ecx, word [0x14009a5ac]
test cx, cx
je 0x14000522b
mov eax, 1
lea rdx, str...USBCPDFW.LOG
cmp ax, cx
lea rcx, [rsp + 0x20]
jne 0x140005187
lea r8, [0x14000daf8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
inc word [0x14009a5ac]
jmp 0x140005194
lea r8, [0x14000db10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x14000522b
lea rdx, str.ERROR:_EnumSystemFirmwareTable_Allocate_Buffer_Failed____n
jmp 0x14000521b
mov eax, 2
cmp ax, word [0x140010048]
jb 0x1400051c5
lea rcx, str.ERROR:_EnumSystemFirmwareTables_Have_Size0____n
call fcn.1400038e0
movzx ecx, word [0x14009a5ac]
test cx, cx
je 0x14000522b
mov eax, 1
lea rdx, str...USBCPDFW.LOG
cmp ax, cx
lea rcx, [rsp + 0x20]
jne 0x1400051fd
lea r8, [0x14000daf8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
inc word [0x14009a5ac]
jmp 0x14000520a
lea r8, [0x14000db10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x14000522b
lea rdx, str.ERROR:_EnumSystemFirmwareTables_Have_Size0____n
call fcn.140009b30
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
movzx eax, r15b
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140009c20
mov rbx, qword [rsp + 0x80]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x14000a5a4
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000a5ee
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000a5ee
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000a5ee
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000a5ee
cmp dword [rcx + 0x84], 0xe
jbe 0x14000a5ee
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14000a5f0
xor al, al
add rsp, 0x28
ret