joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14005cdd0
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x14005cddd
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x14005cded
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x14005cdd5
lea eax, [rcx + 1]
jmp 0x14005cdfb
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x14005ce0e
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x14005cdf4
sub eax, 3
jb 0x14005ce2e
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x14005ce7d
sar eax, 1
movsxd rbp, eax
jb 0x14005ce64
jmp 0x14005ce3c
add ebx, ebx
jne 0x14005ce3a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x14005ce64
inc ecx
add ebx, ebx
jne 0x14005ce4a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x14005ce64
call r11
adc ecx, ecx
add ebx, ebx
jne 0x14005ce5d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x14005ce4c
add ecx, 2
jmp 0x14005ce69
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.14005cd92
jmp 0x14005cddd
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x37e00
mov dl, 9
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x14005cec9
cmp rsi, rcx
jae 0x14005ced1
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x14005ceb0
cmp al, 0x8f
ja 0x14005ceb0
cmp byte [rsi - 2], 0xf
je 0x14005ceb6
sub al, 0xe8
cmp al, 1
ja 0x14005ce9a
cmp rsi, rcx
jae 0x14005ced1
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x14005cea0
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x14005ced1
lodsb al, byte [rsi]
jmp 0x14005ceb0
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x59000]
mov eax, dword [rdi]
or eax, eax
je 0x14005cf2e
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x5d5d8]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x14005cede
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x14005cf28
mov qword [rbx], rax
add rbx, 8
jmp 0x14005cefe
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x14005cf68
cmp al, 0xef
ja 0x14005cf5a
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x14005cf3a
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
jmp 0x14005cf49
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x22f]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x14005cfbc
sub rsp, 0xffffffffffffff80
jmp 0x140020e1c
Function at 0x140002080
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
mov eax, dword [rcx + 0x48]
lea rbx, [rcx + 0x28]
mov rsi, qword [rcx]
lea r11, [rcx + 0x28]
add rbx, rax
mov rdi, rcx
movabs rbp, 0x9e3779b185ebca87
movabs r15, 0x27d4eb2f165667c5
movabs r14, 0xc2b2ae3d27d4eb4f
movabs r12, 0x7a1435883d4d519d
cmp rsi, 0x20
jb 0x14000217b
mov rcx, qword [rcx + 8]
mov r8, qword [rdi + 0x18]
mov r9, qword [rdi + 0x20]
mov rax, r8
mov rdx, qword [rdi + 0x10]
mov r10, r9
rol r10, 0x12
rol rax, 0xc
add r10, rax
mov rax, rdx
rol rax, 7
add r10, rax
mov rax, rcx
rol rax, 1
add r10, rax
movabs rax, 0x85ebca77c2b2ae63
imul rcx, r14
imul rdx, r14
imul r8, r14
imul r9, r14
rol rcx, 0x1f
imul rcx, rbp
rol rdx, 0x1f
xor r10, rcx
rol r8, 0x1f
imul r10, rbp
imul rdx, rbp
imul r8, rbp
sub r10, r12
rol r9, 0x1f
xor r10, rdx
imul r10, rbp
imul r9, rbp
sub r10, r12
xor r10, r8
imul r10, rbp
sub r10, r12
xor r10, r9
imul r10, rbp
add rax, r10
add rax, rsi
jmp 0x140002183
lea rax, [rsi + r15]
add rax, qword [rcx + 0x18]
lea rdx, [rdi + 0x30]
cmp rdx, rbx
ja 0x1400021ba
nop dword [rax]
mov rcx, qword [r11]
add rdx, 8
imul rcx, r14
add r11, 8
rol rcx, 0x1f
imul rcx, rbp
xor rax, rcx
rol rax, 0x1b
imul rax, rbp
sub rax, r12
cmp rdx, rbx
jbe 0x140002190
lea rdx, [r11 + 4]
movabs r8, 0x165667b19e3779f9
cmp rdx, rbx
ja 0x1400021e5
mov ecx, dword [r11]
mov r11, rdx
imul rcx, rbp
xor rax, rcx
rol rax, 0x17
imul rax, r14
add rax, r8
cmp r11, rbx
jae 0x14000220b
nop word [rax + rax]
movzx ecx, byte [r11]
inc r11
imul rcx, r15
xor rax, rcx
rol rax, 0xb
imul rax, rbp
cmp r11, rbx
jb 0x1400021f0
mov rbx, qword [rsp + 0x20]
mov rcx, rax
mov rbp, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
shr rcx, 0x21
xor rcx, rax
imul rcx, r14
mov rdx, rcx
shr rdx, 0x1d
xor rdx, rcx
imul rdx, r8
mov rax, rdx
shr rax, 0x20
xor rax, rdx
pop r15
pop r14
pop r12
ret

Function at 0x14000a2e0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x14002e008]
xor rax, rsp
mov qword [rsp + 0x80], rax
xor eax, eax
lea rbx, [rsp + 0x30]
mov rbp, rdx
mov word [rsp + 0x30], ax
movzx edx, byte [rcx]
mov rsi, rcx
lea edi, [rax + 0x28]
test dl, dl
je 0x14000a385
nop dword [rax]
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14000a33d
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14000a330
cmp rcx, 1
jb 0x14000a3b6
mov byte [rsp + 0x20], dl
mov rcx, 0xffffffffffffffff
mov byte [rsp + 0x21], 0
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x14000a353
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.14000fad0
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14000a320
mov rdx, rbp
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14000b6f0
mov rbx, qword [rsp + 0xc0]
add rsp, 0x90
pop rdi
pop rsi
pop rbp
ret
call fcn.14000f794
int3
Function at 0x14000a440
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x250
mov rax, qword [0x14002e008]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rdi, r8
lea rax, [rsp + 0x30]
mov rbx, rcx
mov qword [rsp + 0x20], rax
xor r8d, r8d
xor ecx, ecx
xor r9d, r9d
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x14000a485
xor al, al
jmp 0x14000a4d2
cmp word [rbx], 0
je 0x14000a49d
nop dword [rax + rax]
add rbx, 2
dec rdi
cmp word [rbx], 0
jne 0x14000a490
cmp word [rsp + 0x30], 0
je 0x14000a4cb
lea rcx, [rsp + 0x30]
sub rcx, rbx
nop dword [rax]
cmp rdi, 1
jb 0x14000a4f3
movzx eax, word [rcx + rbx]
dec rdi
mov word [rbx], ax
add rbx, 2
cmp word [rcx + rbx], 0
jne 0x14000a4b0
xor eax, eax
mov word [rbx], ax
mov al, 1
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.14000b6f0
mov rbx, qword [rsp + 0x270]
add rsp, 0x250
pop rdi
ret
call fcn.14000f794
int3
Function at 0x14000ac80
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
mov eax, 0x2030
call fcn.14001fb50
sub rsp, rax
mov rax, qword [0x14002e008]
xor rax, rsp
mov qword [rsp + 0x2020], rax
mov r11d, dword [0x14002fcd4]
lea rsi, [0x140034d10]
mov rdi, rcx
test r11d, r11d
jne 0x14000acf9
mov r8d, 0x1000
lea rdx, str.HOME
lea rcx, [rsp + 0x20]
call fcn.14000a500
test al, al
je 0x14000add9
lea rcx, [rsp + 0x20]
call fcn.140013e40
movsxd r11, dword [0x14002fcd4]
mov qword [rsi + r11*8], rax
inc r11d
mov dword [0x14002fcd4], r11d
xor r9d, r9d
test r11d, r11d
jle 0x14000ad34
mov r10, rsi
mov r8, qword [r10]
mov rax, rdi
sub r8, rdi
nop dword [rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x14000ad24
add rax, 2
test ecx, ecx
jne 0x14000ad10
test edx, edx
je 0x14000ad57
inc r9d
add r10, 8
cmp r9d, r11d
jl 0x14000ad04
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp word [rdi + rax*2], 0
jne 0x14000ad40
cmp rax, 2
jne 0x14000ad5b
cmp word [rdi + 2], 0x3a
jne 0x14000ad5b
mov al, 1
jmp 0x14000adb8
xor edx, edx
mov qword [rsp + 0x2048], rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
setne bl
test eax, eax
jne 0x14000ad86
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x14000adad
mov bl, 1
cmp dword [0x14002fcd4], 0x400
jge 0x14000adad
mov rcx, rdi
call fcn.140013e40
movsxd rdx, dword [0x14002fcd4]
mov qword [rsi + rdx*8], rax
inc edx
mov dword [0x14002fcd4], edx
movzx eax, bl
mov rbx, qword [rsp + 0x2048]
mov rcx, qword [rsp + 0x2020]
xor rcx, rsp
call fcn.14000b6f0
mov rsi, qword [rsp + 0x2050]
add rsp, 0x2030
pop rdi
ret
lea rcx, str.HOME
call fcn.14000ab20
int3
Function at 0x14000af00
Capabilities:
Check if file exists
Delete file
Get file attributes
Terminate process

Disassembly:
sub rsp, 0x68
mov rcx, qword [0x14002fcd8]
test rcx, rcx
je 0x14000af3b
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14000af2e
mov rcx, qword [0x14002fcd8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, qword [0x14002fcd8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x14002fce8], 0
je 0x14000b02e
mov qword [rsp + 0x70], rbx
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x78], rbp
lea rbp, [0x1400299d8]
mov qword [rsp + 0x80], rsi
lea rsi, [0x140032510]
mov qword [rsp + 0x88], rdi
xor edi, edi
mov qword [rsp + 0x60], r14
mov r14d, 0x414
mov word [rsp + 0x40], r14w
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], rbp
mov dword [rsp + 0x44], edi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rbp
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
mov ebx, edi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14000b00f
test al, 0x10
je 0x14000b00f
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], rbp
mov word [rsp + 0x40], r14w
mov dword [rsp + 0x44], edi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rbp
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
inc ebx
cmp ebx, 0x14
jl 0x14000afb5
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
mov r14, qword [rsp + 0x60]
add rsp, 0x68
ret
Function at 0x14000bfc4
Capabilities:
Parse pe header

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

Function at 0x14000f788
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x14000f60f
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000f60f
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000f60f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000f60f
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000f60f
cmp dword [rcx + 0x84], 0xe
jbe 0x14000f60f
cmp dword [rcx + 0xf8], 0
je 0x14000f60f
mov ecx, ebx
call fcn.14000f6b4
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.14000f4a8
nop
cmp dword [rbp + 0x20], 0
jne 0x14000f670
call fcn.14001427c
cmp eax, 1
jne 0x14000f660
xor dl, dl
jmp 0x14000f66a
call fcn.140014248
test al, al
sete dl
cmp dword [rbp + 0x20], 0
je 0x14000f67b
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000f684
int3
xor r8d, r8d
xor edx, edx
jmp 0x14000f5a0
Function at 0x140018f78
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x140018fff
mov rsi, rbx
cmp word [rax], bp
je 0x140018fbe
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140018fa8
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140018fa4
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1400164b0
mov rdi, rax
test rax, rax
je 0x140018fec
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14000d590
mov rbp, rdi
xor ecx, ecx
call fcn.140015490
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14001b520
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14001b536
mov al, 1
jmp 0x14001b5a2
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14001b547
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14001b5a0
mov ecx, dword [rcx + 0x18]
nop
call fcn.14001971c
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14001b5a0
and qword [rsp + 0x38], 0
lea r8, [rsp + 0x38]
mov r9d, 1
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14001b5a0
and qword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14001b5a0
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14001b5a2
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x14001f9e0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14001fa08
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14001fa08
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x6158be70
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
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.6159bc20
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.6159bc20
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x6158bee0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x617c55e4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x6158c088
mov rax, qword [0x617c55e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x6158bf2c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x6158bfb7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x6158bf10
mov rcx, r12
call fcn.6158cbe0
mov rbp, rax
test rax, rax
je 0x6158c0c2
mov rax, qword [0x617c55e8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.6158cd10
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x617c55e8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6158c0d1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x6158bfb0
sub eax, 4
and eax, 0xfffffffb
jne 0x6158c040
add dword [0x617c55e4], 1
cmp ebx, 8
jae 0x6158bfe8
test bl, 4
jne 0x6158c090
test ebx, ebx
je 0x6158bfd9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x6158c0b0
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x6158bfd9
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x6158c01a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x617c55e8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x6158bfb0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.6158be70
nop dword [rax]
xor edi, edi
jmp 0x6158bf37
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x6158bfd9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x6158bfd9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.6158be70
mov rax, qword [0x617c55e8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.6158be70
nop
nop dword [rax]
Function at 0x6158c850
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x617c58c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x617c58a0]
test rbx, rbx
je 0x6158c8a4
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x6158c89b
test r12, r12
je 0x6158c89b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x6158c880
lea rcx, [0x617c58c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x6158cbe0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x61765ef0]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x6158cc59
mov rcx, r10
call fcn.6158cab0
test eax, eax
je 0x6158cc59
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x6158cc56
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x6158cc4d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x6158cc59
add r8, 0x28
cmp r8, r9
jne 0x6158cc38
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x6158d1e0
Capabilities:
Allocate thread local storage

Disassembly:
push r12
push rbx
sub rsp, 0x28
mov rbx, rcx
mov r12, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x6158d210
mov rdx, r12
mov dword [rbx], eax
add rsp, 0x28
pop rbx
pop r12
jmp fcn.615a1390
add rsp, 0x28
pop rbx
pop r12
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x6158d250
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
sub rsp, 0x28
mov r12d, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, r12d
mov r13d, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r13d
mov r12, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
add rsp, 0x28
pop r12
pop r13
ret

Function at 0x6158d290
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x6158d2a8
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x6158dce0
Capabilities:
Allocate thread local storage

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, qword [rcx + 8]
mov rdi, qword [rcx]
mov rbx, rcx
cmp rsi, 8
ja 0x6158dc90
lea rcx, [rdi + 8]
call sub.msvcrt.dll_malloc
test rax, rax
je 0x6158dcd2
mov rdx, qword [rbx + 0x18]
mov qword [rax], rax
lea r9, [rax + 8]
mov r8, rdi
test rdx, rdx
je 0x6158dcba
mov rcx, r9
call sub.msvcrt.dll_memcpy
mov r9, rax
mov rax, r9
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
lea rcx, [rsi + rdi + 7]
call sub.msvcrt.dll_malloc
test rax, rax
je 0x6158dcd2
lea r9, [rax + rsi + 7]
neg rsi
mov r8, rdi
and r9, rsi
mov qword [r9 - 8], rax
mov rdx, qword [rbx + 0x18]
test rdx, rdx
jne 0x6158dc78
mov rcx, r9
xor edx, edx
call sub.msvcrt.dll_memset
mov r9, rax
mov rax, r9
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]
sub rsp, 0x28
xor ecx, ecx
xor r9d, r9d
mov r8d, 0xffff
mov dword [0x617c5910], 0xffffffff
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x617c5918], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x6158dd30
lea rdx, [0x6158dbf0]
mov dword [0x617c5908], eax
call fcn.615a1390
test eax, eax
jne 0x6158dd38
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x6158dd27
call sub.msvcrt.dll_abort
nop
nop
Function at 0x6158dd40
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r13, qword [0x61765d60]
mov r11d, dword [r13]
mov r12, rcx
test r11d, r11d
jne 0x6158dd80
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x6158dde8
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
mov rbx, qword [rcx + 0x10]
test rbx, rbx
je 0x6158de00
mov r13d, dword [0x617c5908]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rsi
mov r14d, eax
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r14d
mov r13, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r13, r13
je 0x6158de78
mov r14, qword [r13]
cmp r14, rbx
jb 0x6158dec0
lea r13, [r13 + rbx*8]
mov rax, qword [r13]
test rax, rax
jne 0x6158dd69
mov rcx, r12
call fcn.6158dc40
mov qword [r13], rax
jmp 0x6158dd69
call fcn.6158dc40
mov qword [r12 + 0x10], rax
jmp 0x6158dd69
mov r10d, dword [r13]
test r10d, r10d
je 0x6158df22
mov r9d, dword [0x6173f170]
test r9d, r9d
je 0x6158df50
lock add dword [0x617c5910], 1
jne 0x6158df84
mov rbx, qword [r12 + 0x10]
test rbx, rbx
je 0x6158df30
mov eax, dword [r13]
test eax, eax
je 0x6158dd89
mov eax, 0xffffffff
lock xadd dword [0x617c5910], eax
sub eax, 1
js 0x6158dd89
mov rcx, qword [0x617c5918]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x6158dd89
lea rcx, [rbx + 0x21]
mov edx, 8
lea rdi, [rbx + 0x20]
call sub.msvcrt.dll_calloc
mov r13, rax
test rax, rax
je 0x6158dfab
mov qword [rax], rdi
mov ecx, dword [0x617c5908]
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x6158ddc7
call rsi
jmp 0x6158ddc7
lea rdi, [r14 + r14]
lea rax, [rbx + 0x20]
mov rcx, r13
cmp rbx, rdi
cmova rdi, rax
lea rdx, [rdi*8 + 8]
call sub.msvcrt.dll_realloc
mov r13, rax
test rax, rax
je 0x6158dfab
mov qword [rax], rdi
sub rdi, r14
lea rcx, [rax + r14*8 + 8]
xor edx, edx
lea r8, [rdi*8]
call sub.msvcrt.dll_memset
jmp 0x6158de99
call 0x6158dce0
mov dword [0x6173f170], 1
mov edx, dword [r13]
test edx, edx
jne 0x6158de1d
mov rbx, qword [r12 + 0x10]
test rbx, rbx
jne 0x6158dd89
mov rax, qword [0x617c5900]
lea rbx, [rax + 1]
mov qword [0x617c5900], rbx
mov qword [r12 + 0x10], rbx
jmp 0x6158de39
lock add dword [0x6173f174], 1
je 0x6158df07
mov r8d, dword [0x6173f170]
mov rsi, qword [sym.imp.KERNEL32.dll_Sleep]
lea rbx, [0x6173f170]
test r8d, r8d
jne 0x6158df16
nop dword [rax]
xor ecx, ecx
call rsi
mov ecx, dword [rbx]
test ecx, ecx
je 0x6158df78
jmp 0x6158df16
mov rcx, qword [0x617c5918]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x6158de2b
lock sub dword [0x617c5910], 1
jmp 0x6158de2b
call sub.msvcrt.dll_abort
nop
nop word cs:[rax + rax]
nop dword [rax]
cmp qword [rcx], rdx
jae 0x6158dfd0
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x6158dfda
mov qword [rcx + 8], r8
test r9, r9
je 0x6158dfe4
cmp qword [rcx], rdx
je 0x6158dfe8
ret
mov qword [rcx + 0x18], r9
ret