joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180017494
Capabilities:
Get token membership

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x18003b2e0]
xor rax, rsp
mov qword [rbp - 8], rax
lea rax, [rbp - 0x18]
lea rcx, [rbp - 0x10]
mov r9d, 0x220
mov qword [rsp + 0x50], rax
and dword [rsp + 0x48], 0
and dword [rsp + 0x40], 0
and dword [rsp + 0x38], 0
and dword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
mov r8d, 0x20
mov dl, 2
mov dword [rbp - 0x10], 0
mov word [rbp - 0xc], 0x500
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [rbp - 0x20], eax
test eax, eax
je 0x180017525
mov rdx, qword [rbp - 0x18]
lea r8, [rbp - 0x20]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
neg eax
sbb ecx, ecx
and dword [rbp - 0x20], ecx
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [rbp - 0x20]
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.18001ac30
add rsp, 0x80
pop rbp
ret

Function at 0x18001753c
Capabilities:
Impersonate user

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
mov rbp, r9
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
call fcn.1800172d0
lea rax, [0x180046328]
mov qword [rsp + 0x28], rax
mov r9d, 9
mov r8, rdi
mov rdx, rbx
mov rcx, rsi
mov dword [rsp + 0x20], 3
call qword [sym.imp.ADVAPI32.dll_LogonUserA]
test eax, eax
jne 0x1800175a4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Could_not_create_token:__d
mov edx, eax
call fcn.18000d9a8
jmp 0x1800175f5
mov rcx, qword [0x180046328]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x1800175c4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_to_impersonate_token:__d
jmp 0x18001759b
mov rcx, qword [0x180046328]
mov r8d, 0x400
mov rdx, rsi
call fcn.180017644
test eax, eax
je 0x1800175f5
or rdx, 0xffffffffffffffff
inc rdx
cmp byte [rsi + rdx], 0
jne 0x1800175e1
mov r8d, reloc.WS2_32.dll_ntohs
mov rcx, rsi
call rbp
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

Function at 0x1800177cc
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
xor ebx, ebx
mov esi, r8d
mov rdi, rdx
mov rbp, rcx
test r8d, r8d
je 0x18001782b
xor r9d, r9d
mov edx, ebx
mov rcx, rbp
lea r8d, [r9 + 1]
add rdx, rdi
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x18001782b
test eax, eax
je 0x18001782b
add ebx, eax
cmp ebx, 2
jb 0x180017827
lea eax, [rbx - 1]
cmp byte [rax + rdi], 0xa
jne 0x180017827
lea eax, [rbx - 2]
cmp byte [rax + rdi], 0xd
je 0x180017843
cmp ebx, esi
jb 0x1800177f0
or eax, 0xffffffff
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
lea ecx, [rbx - 2]
mov eax, ebx
mov byte [rcx + rdi], 0
jmp 0x18001782e
Function at 0x180017850
Capabilities:
Create thread

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x50
mov rax, qword [0x18003b2e0]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov ebp, r8d
mov rsi, rdx
movzx edi, cx
call fcn.18000e44c
xor r8d, r8d
lea r14d, [r8 + 2]
lea edx, [r8 + 1]
mov ecx, r14d
call qword [sym.imp.WS2_32.dll_socket]
or rcx, 0xffffffffffffffff
mov rbx, rax
cmp rax, rcx
jne 0x1800178a2
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x180017921
movzx ecx, di
mov word [rsp + 0x30], r14w
call qword [sym.imp.WS2_32.dll_htons]
lea rcx, str.127.0.0.1
mov word [rsp + 0x32], ax
call qword [sym.imp.WS2_32.dll_inet_addr]
lea rdx, [rsp + 0x30]
mov r8d, reloc.WS2_32.dll_recv
mov rcx, rbx
mov dword [rsp + 0x34], eax
call qword [sym.imp.WS2_32.dll_bind]
or edi, 0xffffffff
mov rcx, rbx
cmp eax, edi
je 0x180017898
mov edx, 0x78
call qword [sym.imp.WS2_32.dll_listen]
mov rcx, rbx
cmp eax, edi
je 0x180017898
mov r8d, ebp
mov rdx, rsi
call fcn.180017a50
and qword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
lea r8, [0x18001793c]
mov r9, rax
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.18001ac30
add rsp, 0x50
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x18001aa50
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
xor edx, edx
jmp fcn.18001a8b8

Function at 0x1800234dc
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1800234f2
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1800234f4
xor eax, eax
test eax, eax
je 0x180023504
mov ecx, eax
call fcn.18001dc9c
or eax, 0xffffffff
jmp 0x180023506
xor eax, eax
add rsp, 0x28
ret

Function at 0x18002350c
Capabilities:
Create directory

Disassembly:
sub rsp, 0x28
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x180023524
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x180023526
xor eax, eax
test eax, eax
je 0x180023536
mov ecx, eax
call fcn.18001dc9c
or eax, 0xffffffff
jmp 0x180023538
xor eax, eax
add rsp, 0x28
ret

Function at 0x180023540
Capabilities:
Delete directory

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x180023556
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x180023558
xor eax, eax
test eax, eax
je 0x180023568
mov ecx, eax
call fcn.18001dc9c
or eax, 0xffffffff
jmp 0x18002356a
xor eax, eax
add rsp, 0x28
ret
Function at 0x140003dd0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
movaps xmmword [rsp + 0x60], xmm6
movaps xmmword [rsp + 0x70], xmm7
mov ebp, edx
mov r14, rcx
test ebp, ebp
je 0x140003ef5
lea rcx, [0x140012820]
xor ebx, ebx
movabs rsi, 0xdbaf4383c59f19cf
call fcn.140009870
lea rcx, [0x140012800]
mov r15, rax
call fcn.140009870
movdqa xmm7, xmmword [0x14038f480]
mov r12, rax
movdqa xmm6, xmmword [0x14038f490]
lea rax, [0x14000ece0]
mov qword [rsp + 0x28], rax
cmp byte [r15], 0
mov r13d, ebx
movaps xmmword [rsp + 0x30], xmm7
movzx edi, byte [r14 + rbx]
movaps xmmword [rsp + 0x40], xmm6
mov byte [rsp + 0x50], 0xcf
jne 0x140003ea8
mov rax, qword [rsp + 0x30]
mov byte [r12 + 0x21], 1
xor r8d, r8d
mov rdx, r12
mov rcx, qword [rsp + 0x28]
mov qword [r12], rax
mov rax, qword [rsp + 0x38]
mov qword [r12 + 8], rax
mov rax, qword [rsp + 0x40]
mov qword [r12 + 0x10], rax
mov rax, qword [rsp + 0x48]
mov qword [r12 + 0x18], rax
mov eax, 0xffffffcf
mov byte [r12 + 0x20], al
mov byte [r15], 1
call fcn.140008fb0
cmp byte [r12 + 0x21], 0
je 0x140003edc
xor eax, eax
nop word [rax + rax]
mov rcx, rax
mov rdx, rsi
and ecx, 7
shl rcx, 3
shr rdx, cl
xor byte [r12 + rax], dl
add rax, 1
cmp rax, 0x21
jne 0x140003eb8
mov byte [r12 + 0x21], 0
and r13d, 0x1f
xor dil, byte [r12 + r13]
mov byte [r14 + rbx], dil
add rbx, 1
cmp rbp, rbx
jne 0x140003e40
movaps xmm6, xmmword [rsp + 0x60]
movaps xmm7, xmmword [rsp + 0x70]
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140007be0
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x40
mov qword [rsp + 0x58], rdx
xor edx, edx
test rcx, rcx
mov rbx, r8
je 0x140007c14
cmp word [rcx], 0x5a4d
jne 0x140007c14
movsxd rax, dword [rcx + 0x3c]
cmp eax, 0x400
jg 0x140007c14
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140007c14
mov edx, dword [rcx + 0x28]
add rdx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140007b20
test eax, eax
jne 0x140007c30
xor eax, eax
add rsp, 0x40
pop rbx
ret
mov rcx, rbx
call fcn.140007b90
test rax, rax
je 0x140007c25
mov rcx, qword [rbx]
lea rdx, [rax + 0x10]
mov r9d, 8
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x58]
call fcn.1400081b9
not eax
shr eax, 0x1f
add rsp, 0x40
pop rbx
ret
Function at 0x140007e50
Capabilities:
Access peb ldr_data
Encode data using xor
Get ntdll base address
Populate syswhispers2 syscall list
Resolve function by parsing pe exports

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
mov r10d, dword [0x14038d8a0]
test r10d, r10d
jne 0x14000802e
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rcx, qword [rax + 0x10]
mov rax, qword [rcx + 0x30]
test rax, rax
je 0x14000803e
xor r9d, r9d
nop dword [rax + rax]
mov rdx, rax
movsxd rax, dword [rax + 0x3c]
mov eax, dword [rdx + rax + 0x88]
test eax, eax
je 0x140007ecf
lea r9, [rdx + rax]
mov eax, dword [r9 + 0xc]
add rax, rdx
mov r8d, dword [rax]
or r8d, 0x20202020
cmp r8d, 0x6c64746e
jne 0x140007ecf
mov eax, dword [rax + 4]
or eax, 0x20202020
cmp eax, 0x6c642e6c
je 0x140007ee4
mov rcx, qword [rcx]
mov rax, qword [rcx + 0x30]
test rax, rax
jne 0x140007e90
test r9, r9
je 0x14000803e
mov eax, dword [r9 + 0x18]
lea r13, [0x14038d8a4]
xor r11d, r11d
mov edi, dword [r9 + 0x24]
mov r12d, dword [r9 + 0x1c]
lea ecx, [rax - 1]
mov eax, dword [r9 + 0x20]
add rdi, rdx
lea rbx, [rdi + rcx*2]
add r12, rdx
add rax, rdx
lea rsi, [rax + rcx*4]
jmp 0x140007f2c
lea rax, [rbx - 2]
sub rsi, 4
cmp rdi, rbx
je 0x140007fb0
mov rbx, rax
mov eax, dword [rsi]
add rax, rdx
cmp word [rax], 0x775a
jne 0x140007f18
cmp byte [rax], 0
mov ecx, r11d
lea rbp, [r13 + rcx*8]
je 0x14000804b
cmp byte [rax + 1], 0
mov r8d, 0x186b3b6a
mov ecx, 1
mov r9d, 1
je 0x140007f7e
movzx ecx, word [rax + rcx]
mov r14d, r8d
add r9d, 1
ror r14d, 8
add ecx, r14d
xor r8d, ecx
mov ecx, r9d
cmp byte [rax + rcx], 0
jne 0x140007f60
movzx eax, word [rbx]
mov dword [rbp], r8d
add r11d, 1
cmp r11d, 0x1f4
mov eax, dword [r12 + rax*4]
mov dword [rbp + 4], eax
jne 0x140007f18
mov dword [0x14038d8a0], 0x1f4
mov r9d, 0x1f3
jmp 0x140007fc1
lea r9d, [r11 - 1]
cmp r11d, 1
mov dword [0x14038d8a0], r11d
je 0x14000802e
lea esi, [r11 - 2]
lea rbx, [0x14038d8ac]
nop dword [rax]
mov eax, r11d
sub eax, r10d
cmp eax, 1
je 0x140008025
lea rax, [0x14038d8a4]
mov edx, esi
sub edx, r10d
lea r8, [rbx + rdx*8]
nop dword [rax + rax]
mov edx, dword [rax + 4]
mov ecx, dword [rax + 0xc]
cmp ecx, edx
jae 0x14000801c
movd xmm0, dword [rax]
movd xmm2, edx
movd xmm3, ecx
movd xmm1, dword [rax + 8]
punpckldq xmm0, xmm2
movq qword [rax + 8], xmm0
punpckldq xmm1, xmm3
movq qword [rax], xmm1
add rax, 8
cmp r8, rax
jne 0x140007ff0
add r10d, 1
cmp r10d, r9d
jb 0x140007fd0
mov eax, 1
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
xor eax, eax
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov r8d, 0x214af939
jmp 0x140007f7e

Function at 0x1400080c0
Capabilities:
Execute syscall

Disassembly:
pop rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov rcx, r10
call fcn.140008060
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret
Function at 0x140008510
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.14000e610
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.14000e610
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140008580
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1403930a4]
test esi, esi
mov rdi, rcx
mov rbp, rdx
mov rbx, r8
jle 0x140008710
mov rax, qword [0x1403930a8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rdi, rdx
jb 0x1400085cc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rdi, rdx
jb 0x140008655
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x1400085b0
mov rcx, rdi
call fcn.140009420
test rax, rax
mov r12, rax
je 0x140008762
mov rax, qword [0x1403930a8]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.140009560
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1403930a8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140008745
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000864e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400086c0
add dword [0x1403930a4], 1
cmp ebx, 8
jae 0x140008681
test bl, 4
jne 0x140008720
test ebx, ebx
je 0x140008676
movzx eax, byte [rbp]
test bl, 2
mov byte [rdi], al
jne 0x140008734
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, ebx
sub ebx, 1
mov rdx, qword [rbp + rax - 8]
cmp ebx, 8
mov qword [rdi + rax - 8], rdx
jb 0x140008676
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, ebx
mov qword [rdi + rdx], rcx
jb 0x14000869a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov r8d, 4
mov eax, 0x40
mov rcx, qword [rsp + 0x20]
cmovne r8d, eax
mov rdx, qword [rsp + 0x38]
add rsi, qword [0x1403930a8]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000864e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140008510
xor esi, esi
jmp 0x1400085d7
mov eax, dword [rbp]
mov ebx, ebx
mov dword [rdi], eax
mov eax, dword [rbp + rbx - 4]
mov dword [rdi + rbx - 4], eax
jmp 0x140008676
mov ebx, ebx
movzx eax, word [rbp + rbx - 2]
mov word [rdi + rbx - 2], ax
jmp 0x140008676
mov rax, qword [0x1403930a8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.140008510
lea rcx, str.Address__p_has_no_image_section
mov rdx, rdi
call fcn.140008510
nop
nop dword [rax]
nop word cs:[rax + rax]
Function at 0x140008d30
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x140393100]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1403930e0]
test rbx, rbx
je 0x140008d84
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140008d7b
test rsi, rsi
je 0x140008d7b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140008d60
lea rcx, [0x140393100]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140008fb0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
jmp 0x140009250
push rdi
push rsi
push rbx
sub rsp, 0x20
mov eax, dword [0x140393148]
test eax, eax
mov rdi, rcx
mov rsi, rdx
je 0x1400092e0
test r8, r8
je 0x140009291
lea rax, [0x140393c30]
cmp r8, rax
je 0x140009291
lea rdx, str..._.._src_mingw_w64_mingw_w64_crt_crt_tls_atexit.c
mov r8d, 0x46
lea rcx, str._dso__dso____dso_handle
call sub.msvcrt.dll__assert
mov edx, 0x18
mov ecx, 1
call sub.msvcrt.dll_calloc
test rax, rax
mov rbx, rax
je 0x1400092e0
mov qword [rax], rdi
mov ecx, dword [0x14038e8a0]
mov qword [rax + 8], rsi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [0x14038e8a0]
mov rdx, rbx
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x140009250
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
jmp 0x140009250
push rdi
push rsi
push rbx
sub rsp, 0x20
mov eax, dword [0x140393148]
test eax, eax
mov rdi, rcx
mov rsi, rdx
je 0x1400092e0
test r8, r8
je 0x140009291
lea rax, [0x140393c30]
cmp r8, rax
je 0x140009291
lea rdx, str..._.._src_mingw_w64_mingw_w64_crt_crt_tls_atexit.c
mov r8d, 0x46
lea rcx, str._dso__dso____dso_handle
call sub.msvcrt.dll__assert
mov edx, 0x18
mov ecx, 1
call sub.msvcrt.dll_calloc
test rax, rax
mov rbx, rax
je 0x1400092e0
mov qword [rax], rdi
mov ecx, dword [0x14038e8a0]
mov qword [rax + 8], rsi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [0x14038e8a0]
mov rdx, rbx
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
Function at 0x140009420
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x140390020]
xor edx, edx
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x14000948f
mov rcx, r9
call fcn.1400092f0
test eax, eax
je 0x14000948f
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
lea rdx, [r9 + rax + 0x18]
movzx eax, word [r9 + 6]
test eax, eax
je 0x14000948d
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
mov r8d, dword [rdx + 0xc]
cmp rcx, r8
mov rax, r8
jb 0x140009484
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x14000948f
add rdx, 0x28
cmp rdx, r9
jne 0x140009470
xor edx, edx
mov rax, rdx
add rsp, 0x28
ret

Function at 0x140009810
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [0x1403931e0], 0xffffffff
mov r8d, 0xffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x1403931e8], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x140009860
lea rdx, [0x140009720]
mov ecx, eax
mov dword [0x1403931d8], eax
call fcn.14000ebd0
test eax, eax
jne 0x140009868
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140009857
call sub.msvcrt.dll_abort
nop
nop
Function at 0x140009870
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x14038ffc0]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x1400098a8
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x140009910
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r12, qword [rcx + 0x10]
test r12, r12
je 0x140009920
mov esi, dword [0x1403931d8]
mov r13, qword [sym.imp.KERNEL32.dll_GetLastError]
call r13
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x140009990
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x1400099d8
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x140009897
mov rcx, rbx
call fcn.140009770
mov qword [rsi + r12*8 + 8], rax
jmp 0x140009897
call fcn.140009770
mov qword [rbx + 0x10], rax
jmp 0x140009897
mov r10d, dword [rsi]
test r10d, r10d
je 0x140009a3a
mov r9d, dword [0x14038e8b0]
test r9d, r9d
je 0x140009a68
lock add dword [0x1403931e0], 1
jne 0x140009a9c
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x140009a47
mov eax, dword [rsi]
test eax, eax
je 0x1400098b1
lock sub dword [0x1403931e0], 1
js 0x1400098b1
mov rcx, qword [0x1403931e8]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x1400098b1
lea rcx, [r12 + 0x21]
mov edx, 8
call sub.msvcrt.dll_calloc
lea rdi, [r12 + 0x20]
test rax, rax
mov rsi, rax
je 0x140009ac3
mov qword [rax], rdi
mov ecx, dword [0x1403931d8]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x1400098eb
call r13
jmp 0x1400098eb
lea rdi, [rbp + rbp]
mov rcx, rsi
lea rax, [r12 + 0x20]
cmp rdi, r12
cmovb rdi, rax
lea rdx, [rdi*8 + 8]
call sub.msvcrt.dll_realloc
test rax, rax
mov rsi, rax
je 0x140009ac3
mov qword [rax], rdi
lea rcx, [rax + rbp*8 + 8]
sub rdi, rbp
xor edx, edx
lea r8, [rdi*8]
call sub.msvcrt.dll_memset
jmp 0x1400099b3
call fcn.140009810
mov dword [0x14038e8b0], 1
mov edx, dword [rsi]
test edx, edx
jne 0x14000993c
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x1400098b1
mov rax, qword [0x1403931d0]
lea r12, [rax + 1]
mov qword [0x1403931d0], r12
mov qword [rbx + 0x10], r12
jmp 0x140009957
lock add dword [0x14038e8b4], 1
je 0x140009a21
mov r8d, dword [0x14038e8b0]
lea rdi, [0x14038e8b0]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
test r8d, r8d
jne 0x140009a30
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x140009a90
jmp 0x140009a30
mov rcx, qword [0x1403931e8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14000994a
lock sub dword [0x1403931e0], 1
jmp 0x14000994a
call sub.msvcrt.dll_abort
nop
nop dword [rax]
cmp qword [rcx], rdx
jae 0x140009ae0
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x140009aea
mov qword [rcx + 8], r8
test r9, r9
je 0x140009af4
cmp qword [rcx], rdx
je 0x140009af8
ret
mov qword [rcx + 0x18], r9
ret
Function at 0x140008220
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov rax, qword [rsp + 0x68]
mov rax, qword [rax + 8]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x68]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x68]
mov rcx, qword [rcx]
movzx ecx, word [rcx + 0x14]
lea rax, [rax + rcx + 0x18]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
jmp 0x140008286
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x28]
add rax, 0x28
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x68]
mov rax, qword [rax]
movzx eax, word [rax + 6]
cmp dword [rsp + 0x20], eax
jge 0x1400083f1
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x10], 0
jne 0x14000833c
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x38]
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
jle 0x140008337
movsxd rax, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x28]
mov ecx, dword [rcx + 0xc]
mov rdx, qword [rsp + 0x38]
add rdx, rcx
mov rcx, rdx
mov r9d, 4
mov r8d, 0x1000
mov rdx, rax
call qword [0x140482260]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x1400082ff
xor eax, eax
jmp 0x1400083f6
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x28]
mov ecx, dword [rsp + 0x30]
mov dword [rax + 8], ecx
movsxd rax, dword [rsp + 0x24]
mov r8, rax
xor edx, edx
mov rcx, qword [rsp + 0x30]
call fcn.1401e3d60
jmp 0x14000826e
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x14]
mov rcx, qword [rsp + 0x28]
mov ecx, dword [rcx + 0x10]
add rax, rcx
cmp qword [rsp + 0x58], rax
jae 0x14000835d
xor eax, eax
jmp 0x1400083f6
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x10]
mov rcx, qword [rsp + 0x28]
mov ecx, dword [rcx + 0xc]
mov rdx, qword [rsp + 0x38]
add rdx, rcx
mov rcx, rdx
mov r9d, 4
mov r8d, 0x1000
mov edx, eax
call qword [0x140482260]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x14000839d
xor eax, eax
jmp 0x1400083f6
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x10]
mov rcx, qword [rsp + 0x28]
mov ecx, dword [rcx + 0x14]
mov rdx, qword [rsp + 0x50]
add rdx, rcx
mov rcx, rdx
mov r8d, eax
mov rdx, rcx
mov rcx, qword [rsp + 0x30]
call fcn.1401e3910
mov rax, qword [rsp + 0x28]
mov ecx, dword [rsp + 0x30]
mov dword [rax + 8], ecx
jmp 0x14000826e
mov eax, 1
add rsp, 0x48
ret
Function at 0x140008400
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x18
movzx eax, word [rsp + 0x30]
mov word [rsp + 8], ax
mov eax, 1
mov word [rsp + 4], ax
xor eax, eax
mov word [rsp], ax
mov dword [rsp + 0xc], 0
jmp 0x140008440
mov eax, dword [rsp + 0xc]
inc eax
mov dword [rsp + 0xc], eax
mov eax, dword [rsp + 0x28]
cmp dword [rsp + 0xc], eax
jge 0x1400084b0
movzx eax, word [rsp + 4]
movzx ecx, word [rsp]
cmp eax, ecx
jne 0x14000845d
xor eax, eax
mov word [rsp], ax
movsxd rax, dword [rsp + 0xc]
mov rcx, qword [rsp + 0x20]
movzx eax, byte [rcx + rax]
add eax, 0x609
movsxd rcx, dword [rsp + 0xc]
mov rdx, qword [rsp + 0x20]
mov byte [rdx + rcx], al
movsxd rax, dword [rsp + 0xc]
movzx ecx, word [rsp]
movzx ecx, word [rsp + rcx*2 + 8]
mov rdx, qword [rsp + 0x20]
movzx eax, byte [rdx + rax]
xor eax, ecx
movsxd rcx, dword [rsp + 0xc]
mov rdx, qword [rsp + 0x20]
mov byte [rdx + rcx], al
movzx eax, word [rsp]
inc ax
mov word [rsp], ax
jmp 0x140008436
add rsp, 0x18
ret