joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140014cd8
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x180]
sub rsp, 0x280
mov rax, qword [0x14003e060]
xor rax, rsp
mov qword [rbp + 0x170], rax
and qword [rsp + 0x50], 0
xor edi, edi
mov r14, rdx
and dword [rsp + 0x48], edi
and dword [rsp + 0x40], edi
and dword [rsp + 0x44], edi
test rdx, rdx
jne 0x140014d27
lea ecx, [rdx + 0x57]
jmp 0x140014d67
test rcx, rcx
lea rsi, [0x140002788]
lea r8, [0x140009e10]
cmovne rsi, rcx
and dword [rsp + 0x28], edi
and dword [rsp + 0x20], edi
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x48]
call fcn.14001619c
test eax, eax
je 0x140014de2
cmp dword [rsp + 0x48], 1
jne 0x140014d6f
mov ecx, 0x490
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140014de2
xor ebx, ebx
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x44]
lea r9, [rsp + 0x4c]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], rax
and qword [rsp + 0x20], rdi
lea r8, [rsp + 0x60]
mov edx, ebx
mov dword [rsp + 0x4c], 0x104
mov dword [rsp + 0x44], 0x208
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
cmp eax, 0xea
je 0x140014dd9
test eax, eax
jne 0x140014de2
cmp dword [rsp + 0x40], 1
jne 0x140014dd9
lea rdx, [rsp + 0x60]
mov rcx, rsi
call fcn.1400283c8
test eax, eax
je 0x140014ddd
inc ebx
jmp 0x140014d71
mov edi, 1
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140014df2
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
mov rcx, qword [rbp + 0x170]
xor rcx, rsp
call fcn.140028130
lea r11, [rsp + 0x280]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret

Function at 0x14001505c
Capabilities:
Read file via mapping

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, 0x30
xor edi, edi
xor ebx, ebx
mov eax, edx
neg eax
mov rbp, r8
mov r14d, edx
sbb esi, esi
and esi, 0xfffffffe
test rcx, rcx
je 0x1400150f0
test r8, r8
je 0x1400150f0
mov r8, rcx
lea edx, [rdi + 1]
lea ecx, [rsi + 4]
call qword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov rbx, rax
test rax, rax
je 0x14001511c
and qword [rsp + 0x20], rdi
lea edx, [rsi + 4]
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rdi, rax
test rax, rax
je 0x1400150fb
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
neg r14d
mov rcx, rdi
sbb r8d, r8d
xor edx, edx
and r8d, 2
inc r8d
or r8d, 8
call rbp
test rax, rax
je 0x14001510e
jmp 0x14001511e
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14001510e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rdi, rdi
je 0x14001511c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
xor eax, eax
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 0x1400154bc
Capabilities:
Read file via mapping
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov qword [rax + 0x10], rdx
push rdi
push r12
push r15
sub rsp, 0x30
xor esi, esi
or rbx, 0xffffffffffffffff
xor edi, edi
and dword [rax + 0x10], esi
mov rax, qword [rsp + 0x88]
mov r15d, r9d
mov r12, r8
lea ebp, [rsi + 1]
test rax, rax
je 0x1400154fc
and qword [rax], rsi
test rcx, rcx
je 0x140015631
test r8, r8
je 0x140015631
cmp r9d, ebp
jb 0x140015631
cmp dword [rsp + 0x70], ebp
jb 0x140015631
cmp qword [rsp + 0x80], rsi
je 0x140015631
mov edx, 0xc0000000
mov r9d, 0x2000
mov r8d, 3
call fcn.140014f40
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14001564a
and qword [rsp + 0x20], rsi
lea r9, [rsp + 0x58]
mov r8d, r15d
mov rdx, r12
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14001564a
cmp dword [rsp + 0x58], r15d
je 0x14001558a
mov ecx, 0x18
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14001564a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
je 0x14001564a
mov r9d, dword [rsp + 0x70]
mov edx, 4
mov rcx, rbx
mov dword [rsp + 0x28], ebp
and qword [rsp + 0x20], rsi
call fcn.140014e24
mov rdi, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x14001564a
mov ecx, dword [rsp + 0x70]
mov r15d, dword [rsp + 0x78]
mov eax, r15d
mov qword [rsp + 0x20], rcx
mov rcx, rdi
neg eax
sbb edx, edx
xor r9d, r9d
xor r8d, r8d
and edx, 0xfffffffe
add edx, 4
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rsi, rax
test rax, rax
je 0x14001564a
mov eax, 3
test r15d, r15d
mov rcx, rbx
cmovne ebp, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [rsp + 0x70]
mov r8d, ebp
mov rcx, rsi
xor edi, edi
call qword [rsp + 0x80]
test rax, rax
je 0x14001563c
jmp 0x140015672
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x14001564a
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14001565d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rdi - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140015670
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r12
pop rdi
ret
Function at 0x140015694
Capabilities:
Delete file
Set file attributes

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x50
mov rax, qword [0x14003e060]
xor rax, rsp
mov qword [rsp + 0x48], rax
and dword [rsp + 0x20], 0
mov edi, edx
xor edx, edx
mov rbx, rcx
lea rcx, [rsp + 0x24]
lea r8d, [rdx + 0x20]
call fcn.140039a40
lea r8, [rsp + 0x20]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
jne 0x1400156ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xfffffffe
cmp eax, 1
ja 0x1400156ed
xor eax, eax
jmp 0x14001571e
test edi, edi
je 0x140015719
mov edx, 0x80
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1400156e9
mov edx, dword [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140028130
mov rbx, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret

Function at 0x140015b50
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov ebx, edx
mov edi, edx
mov rsi, rcx
add rbx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x140015bae
mov r8d, edi
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x140015bae
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor ebx, ebx
mov rsi, qword [rsp + 0x38]
mov rax, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x14001694c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x450
mov rax, qword [0x14003e060]
xor rax, rsp
mov qword [rsp + 0x440], rax
xor r14d, r14d
or edi, 0xffffffff
test edx, edx
lea ebx, [rdx + 1]
mov rbp, rcx
mov esi, 1
cmovs ebx, r14d
test rcx, rcx
je 0x140016a16
cmp ebx, 0x270f
jle 0x1400169a1
mov esi, r14d
mov ebx, r14d
lea r9, [rsp + 0x20]
mov r8d, ebx
mov edx, 0x101
mov rcx, rbp
call fcn.14001703c
test eax, eax
je 0x140016a16
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140016a16
lea r8, [rsp + 0x230]
lea rcx, [rsp + 0x20]
mov edx, 0x104
call fcn.140016c78
test eax, eax
je 0x140016a16
lea rcx, [rsp + 0x230]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140016a16
mov edi, ebx
inc ebx
cmp ebx, 0x270f
jle 0x1400169a1
test esi, esi
je 0x140016a0e
mov esi, r14d
mov ebx, r14d
cmp ebx, 0x270f
jle 0x1400169a1
mov eax, edi
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.140028130
lea r11, [rsp + 0x450]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret

Function at 0x140016a48
Capabilities:
Enumerate files on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x5b0]
sub rsp, 0x6b0
mov rax, qword [0x14003e060]
xor rax, rsp
mov qword [rbp + 0x5a0], rax
xor r14d, r14d
mov rsi, rcx
test rcx, rcx
jne 0x140016a89
or eax, 0xffffffff
jmp 0x140016bb7
lea r8, [rbp + 0x180]
mov edx, 0x501
call fcn.140016c78
test eax, eax
je 0x140016a81
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
or ebx, 0xffffffff
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140016bb5
test byte [rsp + 0x30], 0x10
je 0x140016b8c
lea rdx, [0x14000a260]
lea rcx, [rsp + 0x5c]
mov r8d, 2
call fcn.140028918
test eax, eax
jne 0x140016b8c
lea r8, [rbp + 0x180]
lea rcx, [rsp + 0x5c]
mov edx, 0x104
call fcn.140016c78
test eax, eax
je 0x140016b8c
lea rax, [rbp + 0x180]
lea r8, [0x140009020]
lea rcx, [rbp + 0x390]
mov r9, rsi
mov edx, 0x103
mov qword [rsp + 0x20], rax
call fcn.140011a88
test eax, eax
js 0x140016b8c
lea rcx, [rbp + 0x390]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140016b8c
mov ecx, r14d
mov r8d, 2
lea rdx, [rsp + 0x60]
cmp word [rdx], r14w
je 0x140016b87
movzx eax, word [rdx]
sub ax, 0x30
cmp ax, 9
ja 0x140016b84
movzx eax, word [rdx]
lea ecx, [rcx + rcx*4]
inc r8d
lea ecx, [rcx - 0x18]
add rdx, 2
lea ecx, [rax + rcx*2]
cmp r8d, 0x104
jl 0x140016b53
jmp 0x140016b87
or ecx, 0xffffffff
cmp ecx, ebx
cmovg ebx, ecx
lea rdx, [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140016bab
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
or rdi, 0xffffffffffffffff
cmp rdi, 0xffffffffffffffff
jne 0x140016ac0
mov eax, ebx
mov rcx, qword [rbp + 0x5a0]
xor rcx, rsp
call fcn.140028130
lea r11, [rsp + 0x6b0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
Function at 0x14001aac4
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
mov rbp, rsp
sub rsp, 0x40
and dword [rbp + 0x18], 0
neg edx
lea rax, [rbp + 0x18]
sbb edi, edi
and qword [rbp - 0x18], 0
and dword [rbp - 0x10], 0
and edi, 3
mov rsi, rcx
mov dword [rbp - 0x20], 0x18
test rax, rax
je 0x14001ab5e
lea r8, [rbp + 0x18]
lea ecx, [rdi + 1]
xor edx, edx
call fcn.1400160d8
mov eax, dword [rbp + 0x18]
test eax, eax
je 0x14001ab5e
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbp - 0x18], rax
test rax, rax
je 0x14001ab5e
lea r8, [rbp + 0x18]
lea ecx, [rdi + 1]
mov rdx, rax
call fcn.1400160d8
test eax, eax
jne 0x14001ab75
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rbp - 0x18]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop rbp
ret
lea rdx, [rbp - 0x20]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp qword [rbp - 0x18], 0
mov ebx, eax
je 0x14001aba0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rbp - 0x18]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
jmp 0x14001ab60
Function at 0x14001ae70
Capabilities:
Check if file exists
Delete file

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x170]
sub rsp, 0x270
mov rax, qword [0x14003e060]
xor rax, rsp
mov qword [rbp + 0x160], rax
mov edi, r8d
lea r8, [rsp + 0x20]
xor edx, edx
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
jne 0x14001aecf
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xfffffffe
cmp eax, 1
ja 0x14001af1f
mov edx, 1
mov rcx, rbx
call fcn.14001aac4
jmp 0x14001af21
test byte [rsp + 0x20], 0x10
jne 0x14001aee0
mov ecx, 0x32
jmp 0x14001af85
lea r8, [rsp + 0x50]
mov edx, 0x103
mov rcx, rbx
call fcn.140016c78
test eax, eax
je 0x14001af1f
lea r8, [rsp + 0x20]
lea rcx, [rsp + 0x50]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x14001af45
test edi, edi
je 0x14001af80
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x14001af50
xor eax, eax
mov rcx, qword [rbp + 0x160]
xor rcx, rsp
call fcn.140028130
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x14001af1f
lea r8, [rsp + 0x50]
mov edx, 0x102
mov rcx, rbx
call fcn.140016c78
test eax, eax
je 0x14001af1f
lea r8, [rsp + 0x20]
lea rcx, [rsp + 0x50]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x14001af9e
test edi, edi
jne 0x14001af8d
mov ecx, 0x50
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14001af1f
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x14001af1f
jmp 0x14001afad
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x14001af1f
lea r9, [rsp + 0x50]
xor r8d, r8d
mov edx, 0x101
mov rcx, rbx
call fcn.14001703c
test eax, eax
je 0x14001af1f
lea rcx, [rsp + 0x50]
mov edx, edi
call fcn.14001abac
test eax, eax
je 0x14001af1f
mov eax, 1
jmp 0x14001af21
Function at 0x14001aff0
Capabilities:
Check mutex on windows

Disassembly:
test rcx, rcx
je 0x14001b124
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x240
mov rax, qword [0x14003e060]
xor rax, rsp
mov qword [rsp + 0x230], rax
mov rbx, rcx
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x14001b100
lea r8, [rsp + 0x20]
mov edx, 0x401
call fcn.140016c78
test eax, eax
je 0x14001b100
lea r8, [rsp + 0x20]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov rdi, rax
test rax, rax
je 0x14001b100
mov edx, 0x493e0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, eax
test eax, 0xffffff7f
je 0x14001b0fc
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x140042e40]
test rax, rax
je 0x14001b0a1
mov r8, qword [0x140042e38]
lea rdx, [0x14000a4c0]
mov ecx, esi
call rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14001b0b3
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, qword [0x140042e40]
test r9, r9
je 0x14001b0d8
mov r8, qword [0x140042e38]
lea rdx, [0x14000a530]
mov ecx, eax
call r9
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x14001b100
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14001b100
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14001b100
mov qword [rbx + 0x50], rdi
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.140028130
lea r11, [rsp + 0x240]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x14001fa08
Capabilities:
Check mutex on windows

Disassembly:
test rcx, rcx
je 0x14001fb3c
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x240
mov rax, qword [0x14003e060]
xor rax, rsp
mov qword [rsp + 0x230], rax
mov rbx, rcx
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x14001fb18
lea r8, [rsp + 0x20]
mov edx, 0x401
call fcn.140016c78
test eax, eax
je 0x14001fb18
lea r8, [rsp + 0x20]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov rdi, rax
test rax, rax
je 0x14001fb18
mov edx, 0x493e0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, eax
test eax, 0xffffff7f
je 0x14001fb14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x140042e40]
test rax, rax
je 0x14001fab9
mov r8, qword [0x140042e38]
lea rdx, [0x14000a4c0]
mov ecx, esi
call rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14001facb
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, qword [0x140042e40]
test r9, r9
je 0x14001faf0
mov r8, qword [0x140042e38]
lea rdx, [0x14000a530]
mov ecx, eax
call r9
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x14001fb18
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14001fb18
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14001fb18
mov qword [rbx + 0x40], rdi
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.140028130
lea r11, [rsp + 0x240]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x140020af4
Capabilities:
Check os version
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x180
mov rax, qword [0x14003e060]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov rbx, rcx
xor r14d, r14d
xor edi, edi
and qword [rsp + 0x48], r14
and qword [rsp + 0x40], rdi
xor ecx, ecx
mov rsi, r8
mov r15, rdx
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rbx, rbx
je 0x140020cac
test rsi, rsi
je 0x140020cac
lea r8d, [r14 + 2]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rbp, rax
test rax, rax
je 0x140020cb7
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x50], 0x114
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x140020c90
cmp dword [rsp + 0x54], 6
jb 0x140020c10
lea rcx, [0x140009820]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
test rax, rax
je 0x140020c90
lea rdx, [0x14000bb78]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140020c90
and qword [rsp + 0x38], r14
and qword [rsp + 0x30], r14
lea rcx, [rsp + 0x48]
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x40]
lea r8d, [r14 + 3]
mov qword [rsp + 0x20], rcx
lea rdx, [0x14000be38]
mov r9d, 0x1100
mov rcx, rbp
call rax
test eax, eax
js 0x140020c90
mov rax, qword [rsp + 0x48]
mov ecx, 0xffffffff
cmp rax, rcx
jbe 0x140020c5a
mov dword [rsi], ecx
jmp 0x140020c90
mov edx, 1
mov rcx, rbp
lea r8d, [rdx + 0xf]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
test rax, rax
je 0x140020c90
mov rdx, rax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140020c90
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [rsp + 0x40], rax
test rax, rax
je 0x140020c90
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [rsi], eax
test r15, r15
je 0x140020c8a
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdx, qword [rsp + 0x40]
mov qword [r15], rax
mov r8d, dword [rsi]
mov rcx, rax
call fcn.140039700
mov r14d, 1
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
test rdi, rdi
je 0x140020ca7
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, r14d
jmp 0x140020cb9
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.140028130
mov rbx, qword [rsp + 0x1c8]
add rsp, 0x180
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x140022318
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
xor edi, edi
mov rax, rdx
mov rbp, rcx
mov esi, edi
mov dword [rsp + 0x68], edi
test rdx, rdx
jne 0x14002234f
lea ecx, [rdx + 0x57]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14002252e
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov r14, rax
test rax, rax
je 0x14002252c
cmp rax, 0xffffffffffffffff
je 0x140022523
mov rax, qword [rbp + 8]
mov r12d, edi
cmp dword [rax + 0x18], edi
jbe 0x140022523
mov edx, 1
mov r15d, 0xffffffff
mov rax, qword [rbp + 0x10]
mov ecx, r12d
mov r8d, 6
movzx ebx, word [rax + rcx*8]
mov rcx, r14
mov eax, ebx
shr eax, 4
add edx, eax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
je 0x140022508
mov rdx, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov qword [rsp + 0x70], rax
test rax, rax
je 0x140022508
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rsi, rax
test rax, rax
je 0x140022504
movzx r13d, word [rax]
add rsi, 2
and ebx, 0xf
je 0x140022409
movsxd rax, r13d
lea rsi, [rsi + rax*2]
movzx r13d, word [rsi]
add rsi, 2
add ebx, r15d
jne 0x1400223f5
lea ecx, [r13 + 1]
add rcx, rcx
cmp rcx, r15
ja 0x14002243a
test ecx, ecx
je 0x14002243a
cmp rcx, r15
cmova ecx, edi
mov ebx, ecx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
jmp 0x14002243d
mov r15, rdi
test r15, r15
je 0x1400224fe
movsxd rax, r13d
mov rdx, rsi
mov rcx, r15
lea rbx, [rax + rax]
mov r8, rbx
call fcn.140039700
mov word [rbx + r15], di
mov rax, qword [rbp + 8]
test rax, rax
je 0x1400224a0
cmp r12d, dword [rax + 0x18]
jae 0x1400224a0
cmp qword [rbp + 0x18], rdi
jne 0x1400224d6
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov ebx, 8
lea r8d, [rbx + 0xc]
mov rcx, rax
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbp + 0x18], rax
test rax, rax
jne 0x1400224cb
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r15
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov r15d, 0xffffffff
jmp 0x140022508
mov rax, qword [rbp + 8]
mov dword [rax + 0x24], 0xa
mov rdx, r15
mov rcx, rbp
call fcn.14002254c
mov edx, r12d
mov ecx, eax
mov rax, qword [rbp + 0x10]
mov dword [rax + rdx*8 + 4], ecx
test ecx, ecx
js 0x1400224a0
mov esi, dword [rsp + 0x68]
inc esi
mov dword [rsp + 0x68], esi
jmp 0x1400224a4
mov r15d, 0xffffffff
mov esi, dword [rsp + 0x68]
mov rax, qword [rbp + 8]
mov edx, 1
add r12d, edx
cmp r12d, dword [rax + 0x18]
jb 0x14002238f
test esi, esi
cmovne edi, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, edi
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret