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

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
sub rsp, 0x40
mov rdi, rcx
mov rcx, qword [0x180036838]
mov rbp, rdx
xor edx, edx
mov r8d, 0x208
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
xor eax, eax
cmp rbx, rax
mov qword [rsp + 0x78], rax
jne 0x180014ed8
mov eax, 8
jmp 0x180014fc0
mov esi, eax
xor edx, edx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x70]
mov r8, rbx
mov rcx, rdi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x70], 0x104
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
cmp eax, 0x103
je 0x180014f4d
test eax, eax
jne 0x180014f39
lea rcx, [0x18003a6c8]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rdx, [0x18003a6c8]
mov rcx, rbx
lea r8d, [rax + 1]
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
je 0x180014f42
add esi, 1
xor eax, eax
mov edx, esi
jmp 0x180014edc
mov rdx, rbp
mov rcx, rdi
call fcn.1800149e0
xor esi, esi
xor edx, edx
jmp 0x180014f93
lea rax, [rsp + 0x78]
mov r9d, 0x20019
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x180014f83
mov rcx, qword [rsp + 0x78]
mov rdx, rbp
call fcn.180014e98
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esi, 1
mov edx, esi
mov r9d, 0x104
mov r8, rbx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
cmp eax, 0x103
jne 0x180014f53
mov rcx, qword [0x180036838]
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret

Function at 0x180014fd0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
xor ebx, ebx
test rcx, rcx
mov rdi, rcx
je 0x18001503c
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
mov esi, eax
je 0x18001503c
mov rcx, qword [0x180036838]
lea r8d, [rax + rax]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rbx, rax
je 0x18001503c
mov r8d, esi
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x18001503c
mov rcx, qword [0x180036838]
mov r8, rbx
xor edx, edx
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 0x1800150e0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
push rsi
push rdi
push r12
sub rsp, 0x40
xor edi, edi
mov rbp, r8
mov r12, rdx
and qword [rax - 0x28], rdi
mov dword [rax - 0x30], 0x80
lea r8d, [rdi + 1]
xor r9d, r9d
mov edx, 0x80000000
mov dword [rax - 0x38], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov rsi, rax
je 0x180015195
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
mov ebx, eax
jne 0x180015140
mov ebx, 0xe8
jmp 0x18001519d
mov rcx, qword [0x180036838]
lea r8d, [rbx + 1]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rdi, rax
je 0x180015195
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x78]
mov r8d, ebx
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180015195
cmp ebx, dword [rsp + 0x78]
je 0x180015186
mov ebx, 0x1e
jmp 0x18001519d
mov byte [rbx + rdi], 0
mov qword [r12], rdi
mov dword [rbp], ebx
xor ebx, ebx
jmp 0x18001519d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp rsi, 0xffffffffffffffff
je 0x1800151ac
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rdi, rdi
je 0x1800151c7
test ebx, ebx
je 0x1800151c7
mov rcx, qword [0x180036838]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbp, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop r12
pop rdi
pop rsi
ret
Function at 0x180015244
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov eax, r9d
mov r13d, r8d
mov r8d, r9d
and al, 3
mov esi, r9d
mov r14, rdx
neg al
mov edx, 0xc0000000
mov r15, rcx
sbb r12d, r12d
and qword [r11 - 0x38], 0
shr r8d, 8
and r12d, 3
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
add r12d, 1
mov ebp, 0x1388
mov dword [r11 - 0x48], r12d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov rdi, rax
jne 0x180015325
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
mov ebx, eax
jne 0x18001531f
test sil, 4
je 0x18001531f
test ebp, ebp
jle 0x18001531f
mov rcx, qword [0x180036a48]
mov edx, 0xc8
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x18001531a
and qword [rsp + 0x30], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], r12d
sub ebp, 0xc8
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov rdi, rax
je 0x1800152b2
jmp 0x18001531f
mov ebx, 0x5b4
cmp rdi, 0xffffffffffffffff
je 0x18001537d
mov r9d, 2
test r9b, sil
je 0x18001533e
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x88]
mov r8d, r13d
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18001536c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor ebx, ebx
jmp 0x180015374
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r11, [rsp + 0x40]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x18001584c
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
mov qword [rsp + 0x10], rbx
mov dword [rsp + 0x18], r8d
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
sub rsp, 0x40
mov ebx, 8
mov dword [rsp + 0x78], 0x104
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [0x180036838]
xor edx, edx
mov r8d, 0x208
mov esi, eax
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rdi, rax
je 0x180015a27
mov rcx, qword [0x180036838]
lea r8d, [rsi + rsi + 0xa]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rbp, rax
mov qword [rsp + 0x30], rax
je 0x180015a10
mov rcx, qword [0x180036838]
xor edx, edx
mov r8d, 0x250
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rsi, rax
je 0x1800159fe
mov rdx, qword [rsp + 0x60]
lea r8, [0x180039bc8]
mov rcx, rbp
call qword [sym.imp.SHLWAPI.dll_PathCombineW]
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp rax, 0xffffffffffffffff
mov qword [rsp + 0x28], rax
jne 0x180015916
lea ebx, [rax + 4]
jmp 0x1800159ec
xor ebx, ebx
lea rax, [rsi + 0x2c]
cmp word [rax], 0x2e
je 0x1800159c1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [rsp + 0x20]
lea ebp, [rax + rcx + 2]
cmp dword [rsp + 0x78], ebp
jae 0x18001596f
mov rcx, qword [0x180036838]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x180036838]
lea r8d, [rbp + rbp]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rdi, rax
je 0x1800159d8
mov dword [rsp + 0x78], ebp
mov rdx, qword [rsp + 0x60]
lea r8, [rsi + 0x2c]
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathCombineW]
test byte [rsi], 0x10
mov rcx, rdi
je 0x1800159b1
mov ebp, dword [rsp + 0x70]
mov edx, 1
mov r8d, ebp
call fcn.18001584c
test eax, eax
mov ebx, eax
jne 0x1800159e7
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x1800159c1
test ebp, ebp
jmp 0x1800159bf
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1800159c1
cmp dword [rsp + 0x70], eax
je 0x1800159df
mov rcx, qword [rsp + 0x28]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x1800159e7
jmp 0x180015918
mov ebx, 8
jmp 0x1800159e7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rbp, qword [rsp + 0x30]
mov rcx, qword [0x180036838]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x180036838]
mov r8, rbp
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test rdi, rdi
je 0x180015a27
mov rcx, qword [0x180036838]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
Function at 0x180015a88
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov ebx, ecx
xor edx, edx
xor ecx, ecx
xor edi, edi
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
mov esi, eax
je 0x180015b3c
mov rcx, qword [0x180036838]
lea r8d, [rax + 0x1d]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rdi, rax
je 0x180015b3c
mov rdx, rax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x180015b28
test ebx, ebx
je 0x180015af4
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, [rsp + 0x38]
add ebx, eax
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
add ebx, dword [rsp + 0x38]
mov r9, rdi
mov r8d, ebx
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x180015b28
test ebx, ebx
je 0x180015b3c
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
lea rdx, [0x1800394a0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x180015b3c
mov rcx, qword [0x180036838]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor edi, edi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
mov rax, rdi
add rsp, 0x20
pop rdi
ret

Function at 0x180015b50
Capabilities:
Create directory
Get common file path

Disassembly:
push rbx
sub rsp, 0x20
mov ecx, 0x2365
call fcn.180015a88
test rax, rax
mov rbx, rax
je 0x180015c03
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
test rax, rax
je 0x180015b99
lea rcx, [rbx + 4]
cmp rax, rcx
jbe 0x180015b99
cmp dword [rax - 5], 0x776f4c5c
jne 0x180015b99
lea rcx, [rax - 4]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
xor edx, edx
mov rcx, rbx
mov byte [rax], 0
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x180015bef
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r9, rbx
xor edx, edx
xor eax, 0x2365
mov rcx, rbx
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x180015bef
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
lea rdx, [0x1800394a0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x180015c03
mov rcx, qword [0x180036838]
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
ret
Function at 0x180015cfc
Capabilities:
Allocate or change rwx memory

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rsi
push rdi
push r12
push r13
sub rsp, 0x20
and dword [rax + 0x18], 0
xor esi, esi
cmp byte [0x180036a2c], 6
mov rbp, rdx
mov rbx, rcx
mov edi, 8
ja 0x180015da8
test rcx, rcx
je 0x180015da8
mov rax, qword [rdx + 0x30]
movabs r13, 0x8000000000000000
test qword [rax + 8], r13
jne 0x180015d4f
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
lea r9, [rsp + 0x50]
mov r8d, 0x40
mov edx, edi
mov rcx, rbx
mov r12d, edi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
mov esi, eax
je 0x180015da8
mov rcx, qword [rbp + 0x30]
mov qword [rbp + 0x40], rbx
test qword [rcx + 8], r13
jne 0x180015d85
lea ecx, [rdi - 2]
mov byte [rcx + rbx], 0x7e
jmp 0x180015d92
movabs rax, 0x4000000000000000
or qword [rbx], rax
mov r8d, dword [rsp + 0x50]
lea r9, [rsp + 0x50]
mov rdx, r12
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov eax, esi
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r13
pop r12
pop rdi
ret
Function at 0x1800163b0
Capabilities:
Allocate or change rwx memory

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push r13
sub rsp, 0x40
mov rdi, r9
mov r13d, r8d
mov rsi, rdx
mov r12, rcx
and qword [rax - 0x18], 0
lea r9, [rax - 0x18]
xor r8d, r8d
mov rdx, qword [rcx + 8]
mov rcx, rsi
call fcn.180018db8
mov rbx, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x180016581
and dword [rsp + 0x24], 0
lea r9, [rsp + 0x24]
mov edx, 4
lea r8d, [rdx + 0x3c]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180016577
mov qword [rdi + 0x30], r12
mov eax, dword [rbx]
add rax, rsi
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], rbx
mov eax, dword [rbx]
mov qword [rdi + 0x20], rax
mov r9, rdi
mov r8d, r13d
mov rdx, rsi
mov rcx, r12
call fcn.18001628c
mov ebx, eax
mov dword [rsp + 0x28], eax
cmp eax, 1
jne 0x18001658a
mov eax, dword [0x180036a00]
test eax, eax
je 0x1800164d7
mov rdx, qword [rdi + 0x10]
mov rcx, rsi
call fcn.180016130
mov rbx, rax
test rax, rax
je 0x1800164d7
lea r9, [rsp + 0x20]
mov r8d, 0x40
lea r13d, [r8 - 0x32]
mov rdx, r13
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1800164d7
and dword [rbx + 2], 0
mov rax, qword [rdi + 0x28]
mov qword [rbx + 6], rax
mov word [rbx], 0x25ff
mov qword [rdi + 0x28], rbx
mov qword [r12 + 0x18], rbx
mov r8d, dword [rsp + 0x20]
lea eax, [r13 + 0x12]
cmp r8d, 0x40
cmovne r8d, eax
mov dword [rsp + 0x20], r8d
lea r9, [rsp + 0x20]
mov rdx, r13
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rax, qword [rdi + 0x28]
sub rax, rsi
mov rcx, qword [rsp + 0x38]
mov dword [rcx], eax
lea r9, [rsp + 0x24]
mov r8d, dword [rsp + 0x24]
mov edx, 4
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
or dword [rdi + 0x38], 0x102
bt dword [rdi + 0x38], 9
jae 0x180016515
mov rdx, rdi
mov rcx, qword [rsp + 0x30]
call fcn.180015cfc
lea rcx, [0x180036be0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r11, qword [0x180036bd0]
mov qword [rdi], r11
lea rax, [0x180036bd0]
mov qword [rdi + 8], rax
mov qword [r11 + 8], rdi
mov qword [0x180036bd0], rdi
lea rcx, [0x180036be0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r11, qword [rdi + 0x20]
lea rax, [rsi + r11]
mov qword [r12 + 0x20], rax
xor ebx, ebx
mov dword [rsp + 0x28], ebx
mov rcx, rsi
call fcn.180016eb4
test rax, rax
je 0x18001658a
and dword [rax + 0x80], ebx
jmp 0x18001658a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x18001658a
mov ebx, 2
mov dword [rsp + 0x28], ebx
jmp 0x18001658e
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x60]
mov r12, qword [rsp + 0x68]
add rsp, 0x40
pop r13
ret
Function at 0x1800165ac
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rsi, rcx
lea rcx, [rsp + 0x48]
call fcn.180015c0c
test eax, eax
mov ebx, eax
jne 0x1800166b1
and dword [rsp + 0x40], eax
mov rax, qword [rsi + 0x10]
mov rdi, qword [rsp + 0x48]
mov ebx, 8
mov qword [rdi + 0x28], rax
mov rcx, qword [rsi + 8]
lea r9, [rsp + 0x40]
lea r8d, [rbx + 0x38]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180016693
mov rax, qword [rsi + 8]
lea r9, [rsp + 0x40]
mov rdx, rbx
mov rcx, qword [rax]
mov qword [rdi + 0x10], rcx
mov rax, qword [rsi + 8]
mov qword [rdi + 0x18], rax
mov rax, qword [rsi + 8]
mov rcx, qword [rax]
mov qword [rdi + 0x20], rcx
mov rcx, qword [rsi + 8]
mov rax, qword [rdi + 0x28]
mov qword [rcx], rax
mov r8d, dword [rsp + 0x40]
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
or dword [rdi + 0x38], 0x101
lea rcx, [0x180036be0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r11, qword [0x180036bd0]
lea rax, [0x180036bd0]
mov qword [rdi], r11
mov qword [rdi + 8], rax
mov qword [r11 + 8], rdi
lea rcx, [0x180036be0]
mov qword [0x180036bd0], rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r11, qword [rdi + 0x20]
xor ebx, ebx
mov qword [rsi + 0x20], r11
jmp 0x1800166b1
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ebx, eax
je 0x1800166b1
mov rcx, qword [0x180036838]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rsi, qword [rsp + 0x38]
mov eax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x1800166c4
Capabilities:
Allocate or change rwx memory

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x30
mov rbx, rcx
and dword [rax - 0x18], 0
and dword [rax + 0x10], 0
movzx esi, byte [rcx + 0x38]
mov eax, esi
sub eax, 1
je 0x180016792
sub eax, 1
je 0x180016701
cmp eax, 6
jne 0x180016856
jmp 0x1800167ef
mov eax, dword [0x180036a00]
test eax, eax
je 0x180016753
mov rdi, qword [rcx + 0x28]
cmp word [rdi], 0x25ff
jne 0x180016792
lea r9, [rsp + 0x48]
mov edx, 0xe
lea r8d, [rdx + 0x32]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180016792
mov rax, qword [rbx + 0x10]
mov qword [rdi + 6], rax
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x48]
mov edx, 0xe
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x180016792
lea r9, [rsp + 0x48]
mov edi, 4
lea r8d, [rdi + 0x3c]
mov rdx, rdi
mov rcx, qword [rcx + 0x18]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180016792
mov rcx, qword [rbx + 0x18]
mov eax, dword [rbx + 0x20]
mov dword [rcx], eax
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x48]
mov rdx, rdi
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea r9, [rsp + 0x48]
mov edi, 8
lea r8d, [rdi + 0x38]
mov rdx, rdi
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1800167e5
cmp esi, 1
jne 0x1800167c3
mov rcx, qword [rbx + 0x18]
mov rax, qword [rbx + 0x20]
mov qword [rcx], rax
jmp 0x1800167cc
mov rcx, qword [rbx + 0x18]
mov eax, dword [rbx + 0x20]
mov dword [rcx], eax
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x48]
mov rdx, rdi
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x1800167ef
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
bt dword [rbx + 0x38], 9
jae 0x180016851
cmp qword [rbx + 0x40], 0
je 0x180016851
mov rcx, qword [rbx + 0x30]
mov rcx, qword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
lea r9, [rsp + 0x48]
mov r8d, 0x40
mov edx, eax
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180016851
mov rdx, qword [rbx + 0x30]
mov rdx, qword [rdx + 8]
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x48]
mov rdx, rdi
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
btr dword [rbx + 0x38], 8
jmp 0x18001685c
mov eax, dword [rsp + 0x20]
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x180016b58
Capabilities:
Check os version

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rbx, qword [0x180036b80]
lea rbp, [0x180036b80]
jmp 0x180016c06
mov rsi, rbx
mov rbx, qword [rbx]
mov rax, qword [rsi + 8]
mov rcx, qword [rsi]
mov qword [rax], rcx
mov qword [rcx + 8], rax
mov rdi, qword [rsi + 0x10]
call qword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 6
jb 0x180016bca
lea rcx, [0x1800398be]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x18003a095]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180016bf4
mov rcx, rdi
call rax
jmp 0x180016bf4
cmp qword [0x180036ac0], 0
je 0x180016bf4
mov rcx, qword [rdi]
mov rax, qword [rdi + 8]
mov r8, rdi
mov qword [rax], rcx
mov qword [rcx + 8], rax
mov rcx, qword [0x180036838]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x180036838]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp rbx, rbp
jne 0x180016b7f
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x180016d58
Capabilities:
Enumerate pe sections
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x50
mov rdi, rdx
lea rdx, [rax - 0x10]
xor r8d, r8d
mov rbp, rcx
xor ebx, ebx
call fcn.180017664
cmp eax, ebx
jne 0x180016e9a
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, rbp
call fcn.180018db8
cmp rax, rbx
mov r11, rax
je 0x180016e86
movsxd r9, dword [rbp + 0x3c]
sub r11d, ebp
add r9, rbp
movzx ecx, word [r9 + 0x14]
movzx r10d, word [r9 + 6]
lea r8, [rcx + r9 + 0x18]
cmp r11d, dword [r8 + 0xc]
jb 0x180016de0
mov ecx, dword [r9 + 0x3c]
mov eax, dword [r8 + 0x10]
lea edx, [rax + rcx - 1]
lea eax, [rcx - 1]
not eax
and edx, eax
add edx, dword [r8 + 0xc]
cmp r11d, edx
jb 0x180016df2
add r8, 0x28
add r10w, 0xffff
je 0x180016e86
jmp 0x180016dbe
mov edi, dword [r8 + 0x14]
sub edi, dword [r8 + 0xc]
add edi, r11d
je 0x180016e86
mov rcx, qword [rsp + 0x48]
xor r9d, r9d
mov qword [rsp + 0x30], rbx
lea r8d, [r9 + 1]
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
mov rsi, rax
je 0x180016e86
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, edi
jne 0x180016e7d
lea r9, [rsp + 0x78]
lea rdx, [rsp + 0x40]
mov r8d, 4
mov rcx, rsi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
je 0x180016e7d
cmp dword [rsp + 0x78], 4
jne 0x180016e7d
mov ebx, dword [rsp + 0x40]
add rbx, rbp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8, qword [rsp + 0x48]
mov rcx, qword [0x180036838]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
mov rax, rbx
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret