joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001659b
Capabilities:
Generate random numbers via rtlgenrandom
Generate random numbers via winapi

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rdi, rcx
mov r12d, 0x20
xor esi, esi
mov r13d, 0xffffffff
test r12, r12
je 0x14001662c
mov r14, rdi
cmp r12, r13
mov r15d, 0xffffffff
cmovb r15, r12
add rdi, r15
sub r12, r15
xor ecx, ecx
mov rdx, r14
mov r8d, r15d
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
cmp eax, 0xc0000000
jb 0x1400165bb
mov ebx, eax
mov rcx, r14
mov edx, r15d
call sub.advapi32.dll_SystemFunction036
test al, al
jne 0x1400165bb
xor ebx, 0x80000000
je 0x14001662a
mov al, byte [0x140054188]
mov ecx, 4
mov edx, 4
call fcn.140002ca0
test rax, rax
je 0x14001663f
mov rsi, rax
mov dword [rax], ebx
jmp 0x14001662c
xor esi, esi
mov rax, rsi
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 4
mov edx, 4
call fcn.140003cb0
ud2

Function at 0x1400166a0
Capabilities:
Generate random numbers via winapi
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov rsi, rcx
mov ecx, dword [0x1400450b0]
test ecx, ecx
je 0x1400167b0
dec ecx
call fcn.140042a54
cmp rax, 2
jb 0x1400166db
cmp qword [rax + 8], 0
je 0x1400166db
mov rcx, rax
add rcx, 0x10
mov rax, qword [rax + 0x10]
jmp 0x140016791
mov ecx, dword [0x1400450b0]
test ecx, ecx
je 0x1400167c3
dec ecx
call fcn.140042a54
mov rdi, rax
cmp rax, 1
je 0x1400167a6
test rdi, rdi
jne 0x14001674a
mov al, byte [0x140054188]
mov ecx, 0x20
mov edx, 8
call fcn.140002ca0
test rax, rax
je 0x1400167e9
mov rdi, rax
lea rax, [0x140045098]
mov qword [rdi], rax
and qword [rdi + 8], 0
mov ecx, dword [0x1400450b0]
test ecx, ecx
je 0x1400167d6
dec ecx
mov rdx, rdi
call fcn.140042a5c
xorps xmm0, xmm0
lea rdx, [rsp + 0x20]
movaps xmmword [rdx], xmm0
xor ecx, ecx
mov r8d, 0x10
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
js 0x140016778
mov rax, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x28]
jmp 0x14001677d
call fcn.140042350
mov qword [rdi + 8], 1
lea rcx, [rdi + 0x10]
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], rdx
mov rdx, qword [rcx + 8]
lea r8, [rax + 1]
mov qword [rcx], r8
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rdx
xor edi, edi
mov qword [rsi], rdi
add rsp, 0x38
pop rdi
pop rsi
ret
lea rcx, [0x140045098]
call fcn.140037b00
mov ecx, eax
jmp 0x1400166b9
lea rcx, [0x140045098]
call fcn.140037b00
mov ecx, eax
jmp 0x1400166eb
lea rcx, [0x140045098]
call fcn.140037b00
mov ecx, eax
jmp 0x140016742
mov ecx, 8
mov edx, 0x20
call fcn.140003cb0
ud2

Function at 0x14001746a
Capabilities:
Hash data using djb2

Disassembly:
mov eax, 0x1505
xor r8d, r8d
cmp r8, rdx
jae 0x1400174a6
mov r9b, byte [rcx + r8]
test r9b, r9b
jne 0x140017485
inc r8
jmp 0x140017472
lea r10d, [r9 - 0x20]
cmp r9b, 0x61
movzx r9d, r9b
movzx r10d, r10b
cmovb r10d, r9d
imul r9d, eax, 0x21
movzx eax, r10b
add eax, r9d
jmp 0x140017480
ret
Function at 0x14001b6e0
Capabilities:
Encode data using xor

Disassembly:
mov rax, rdx
sub rdx, rcx
cmp rdx, 0x20
jae fcn.14000b470
cmp rax, rcx
je 0x14001b705
cmp rdx, 4
jae 0x14001b708
xor eax, eax
xor r8d, r8d
jmp 0x14001b7a0
xor eax, eax
ret
mov r8, rdx
and r8, 0xfffffffffffffffc
pxor xmm0, xmm0
xor eax, eax
movdqa xmm2, xmmword [0x140046df0]
movdqa xmm3, xmmword [0x140046e00]
pxor xmm1, xmm1
nop dword [rax]
movzx r9d, word [rcx + rax]
movd xmm4, r9d
movzx r9d, word [rcx + rax + 2]
movd xmm5, r9d
pcmpgtb xmm4, xmm2
punpcklbw xmm4, xmm4
pshuflw xmm4, xmm4, 0xd4
pshufd xmm4, xmm4, 0xd4
pand xmm4, xmm3
paddq xmm0, xmm4
pcmpgtb xmm5, xmm2
punpcklbw xmm5, xmm5
pshuflw xmm4, xmm5, 0xd4
pshufd xmm4, xmm4, 0xd4
pand xmm4, xmm3
paddq xmm1, xmm4
add rax, 4
cmp r8, rax
jne 0x14001b730
paddq xmm1, xmm0
pshufd xmm0, xmm1, 0xee
paddq xmm0, xmm1
movq rax, xmm0
cmp r8, rdx
je 0x14001b7b7
nop dword [rax]
xor r9d, r9d
cmp byte [rcx + r8], 0xc0
setge r9b
add rax, r9
inc r8
cmp rdx, r8
jne 0x14001b7a0
ret
Function at 0x14001c140
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x48
mov rsi, rcx
mov r8, qword [rcx]
test r8, r8
je 0x14001c238
mov r10, qword [rsi + 8]
mov rcx, qword [rsi + 0x10]
cmp rcx, r10
jae 0x14001c238
movzx eax, byte [r8 + rcx]
cmp eax, 0x42
je 0x14001c253
cmp eax, 0x49
jne 0x14001c238
inc rcx
mov qword [rsi + 0x10], rcx
mov rcx, rsi
xor edx, edx
call fcn.140017b90
test al, al
jne 0x14001c378
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x14001c1bc
lea rdx, [0x14004b61b]
mov r8d, 1
call fcn.140008a70
test al, al
jne 0x14001c378
mov rax, qword [rsi]
mov dil, 1
test rax, rax
je 0x14001c247
xor r14d, r14d
lea rbx, [0x14004b1c9]
nop word cs:[rax + rax]
mov rcx, qword [rsi + 0x10]
cmp rcx, qword [rsi + 8]
jae 0x14001c1f9
test rax, rax
je 0x14001c1f9
cmp byte [rax + rcx], 0x45
je 0x14001c39a
sub r14, 1
jb 0x14001c21e
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x14001c21e
mov r8d, 2
mov rdx, rbx
call fcn.140008a70
test al, al
jne 0x14001c378
mov rcx, rsi
call fcn.140019490
test al, al
jne 0x14001c378
mov rax, qword [rsi]
test rax, rax
jne 0x14001c1e0
jmp 0x14001c247
mov rcx, rsi
xor edx, edx
call fcn.140017b90
mov edi, eax
add dil, dil
mov eax, edi
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop r14
ret
lea r11, [rcx + 1]
mov qword [rsi + 0x10], r11
cmp r11, r10
jae 0x14001c273
cmp byte [r8 + r11], 0x5f
jne 0x14001c273
lea rax, [rcx + 2]
mov qword [rsi + 0x10], rax
xor eax, eax
jmp 0x14001c2de
xor eax, eax
mov edi, 0x3e
nop word [rax + rax]
mov r9b, 1
cmp r11, r10
jae 0x14001c33f
movzx edx, byte [r8 + r11]
cmp dl, 0x5f
je 0x14001c2d2
lea ebx, [rdx - 0x30]
cmp bl, 0xa
jb 0x14001c2bc
lea ebx, [rdx - 0x61]
cmp bl, 0x1a
jae 0x14001c2ab
add dl, 0xa9
jmp 0x14001c2ba
lea ebx, [rdx - 0x41]
cmp bl, 0x1a
jae 0x14001c33f
add dl, 0xe3
mov ebx, edx
inc r11
mov qword [rsi + 0x10], r11
mul rdi
jo 0x14001c33f
movzx edx, bl
add rax, rdx
jae 0x14001c280
jmp 0x14001c33f
inc r11
mov qword [rsi + 0x10], r11
inc rax
je 0x14001c33f
cmp rax, rcx
jae 0x14001c33c
mov ecx, dword [rsi + 0x18]
inc ecx
cmp ecx, 0x1f4
ja 0x14001c392
cmp qword [rsi + 0x20], 0
je 0x14001c38b
movups xmm0, xmmword [rsi]
movups xmm1, xmmword [rsi + 0x10]
movaps xmmword [rsp + 0x30], xmm1
movaps xmmword [rsp + 0x20], xmm0
mov qword [rsi + 0x10], rax
mov dword [rsi + 0x18], ecx
mov rcx, rsi
call fcn.14001c140
mov edi, eax
movaps xmm0, xmmword [rsp + 0x20]
movaps xmm1, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
movups xmmword [rsi + 0x10], xmm1
cmp al, 2
jne 0x14001c247
jmp 0x14001c378
mov r9b, 1
xor edi, edi
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x14001c380
mov eax, r9d
xor al, 1
movzx eax, al
lea r8, [rax + rax*8]
add r8, 0x10
lea rax, str.invalid_syntaxrecursion_limit_reached_for_______::closureshim_as__mut_const___dyn___Cunsafe_extern__
lea rdx, [0x14004b1a8]
test r9b, r9b
cmovne rdx, rax
call fcn.140008a70
test al, al
je 0x14001c380
mov dil, 2
jmp 0x14001c247
mov qword [rsi], 0
mov byte [rsi + 8], dil
xor edi, edi
jmp 0x14001c247
mov dil, 1
xor r9d, r9d
jmp 0x14001c341
inc rcx
mov qword [rsi + 0x10], rcx
jmp 0x14001c247
Function at 0x140028230
Capabilities:
Create thread

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x38
mov rbx, r8
mov r14, rdx
mov rdi, rcx
movzx eax, byte [0x140054188]
mov ecx, 0x10
mov edx, 8
call fcn.140002ca0
test rax, rax
je 0x1400282e8
mov rsi, rax
mov qword [rax], r14
mov qword [rax + 8], rbx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x10000
lea r8, [0x140028340]
xor ebx, ebx
xor ecx, ecx
mov rdx, rdi
mov r9, rax
call sub.kernel32.dll_CreateThread
mov rdx, rax
test rax, rax
jne 0x1400282db
mov rbx, qword [rsi]
mov r14, qword [rsi + 8]
mov rcx, rbx
call qword [r14]
cmp qword [r14 + 8], 0
je 0x1400282ba
mov rdx, qword [r14 + 0x10]
mov rcx, rbx
call fcn.140002d30
mov edx, 8
mov rcx, rsi
call fcn.140002d30
call sub.kernel32.dll_GetLastError
mov edx, eax
shl rdx, 0x20
or rdx, 2
mov ebx, 1
mov rax, rbx
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r14
ret
mov ecx, 8
mov edx, 0x10
call fcn.140003cb0
ud2
Function at 0x140033f90
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x20
mov ecx, dword [0x1400450e8]
test ecx, ecx
je 0x14003404d
dec ecx
call fcn.140042a54
cmp rax, 2
jb 0x140033fc0
cmp qword [rax + 8], 0
je 0x140033fc0
add rax, 0x10
jmp 0x140034047
mov ecx, dword [0x1400450e8]
test ecx, ecx
je 0x140034060
dec ecx
call fcn.140042a54
cmp rax, 1
je 0x140034045
mov rsi, rax
test rax, rax
jne 0x14003402b
movzx eax, byte [0x140054188]
mov ecx, 0x20
mov edx, 8
call fcn.140002ca0
test rax, rax
je 0x140034083
mov rsi, rax
lea rax, [0x1400450d0]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x1400450e8]
test ecx, ecx
je 0x140034073
dec ecx
mov rdx, rsi
call fcn.140042a5c
mov qword [rsi + 8], 1
lea rax, [rsi + 0x10]
mov qword [rsi + 0x10], 0
mov byte [rsi + 0x18], 0
jmp 0x140034047
xor eax, eax
add rsp, 0x20
pop rsi
ret
lea rcx, [0x1400450d0]
call fcn.140037b00
mov ecx, eax
jmp 0x140033fa5
lea rcx, [0x1400450d0]
call fcn.140037b00
mov ecx, eax
jmp 0x140033fd0
lea rcx, [0x1400450d0]
call fcn.140037b00
mov ecx, eax
jmp 0x140034023
mov ecx, 8
mov edx, 0x20
call fcn.140003cb0
ud2

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

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov ecx, dword [0x140045070]
test ecx, ecx
je 0x140034520
dec ecx
call fcn.140042a54
cmp rax, 2
jb 0x140034474
mov rdi, rax
cmp qword [rax + 8], 0
je 0x140034474
add rdi, 0x10
jmp 0x140034516
mov ecx, dword [0x140045070]
test ecx, ecx
je 0x140034533
dec ecx
call fcn.140042a54
cmp rax, 1
je 0x140034514
mov rsi, rax
test rax, rax
jne 0x1400344e3
movzx eax, byte [0x140054188]
mov ecx, 0x18
mov edx, 8
call fcn.140002ca0
test rax, rax
je 0x140034556
mov rsi, rax
lea rax, [0x140045058]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x140045070]
test ecx, ecx
je 0x140034546
dec ecx
mov rdx, rsi
call fcn.140042a5c
lea rdi, [rsi + 0x10]
mov rcx, qword [rsi + 0x10]
cmp qword [rsi + 8], 0
mov qword [rsi + 8], 1
mov qword [rsi + 0x10], 0
je 0x140034516
test rcx, rcx
je 0x140034516
lock dec qword [rcx]
jne 0x140034516
call fcn.140033f40
jmp 0x140034516
xor edi, edi
mov rax, rdi
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, [0x140045058]
call fcn.140037b00
mov ecx, eax
jmp 0x140034456
lea rcx, [0x140045058]
call fcn.140037b00
mov ecx, eax
jmp 0x140034484
lea rcx, [0x140045058]
call fcn.140037b00
mov ecx, eax
jmp 0x1400344db
mov ecx, 8
mov edx, 0x18
call fcn.140003cb0
ud2
Function at 0x140034820
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov ecx, dword [0x140045090]
test ecx, ecx
je 0x140034900
add byte [rax], al
dec ecx
call fcn.140042a54
cmp rax, 2
jb 0x140034854
mov rdi, rax
cmp qword [rax + 8], 0
je 0x140034854
add rdi, 0x10
jmp 0x1400348f6
invalid
mov ecx, dword [0x140045090]
test ecx, ecx
leave
je 0x140034913
dec ecx
call fcn.140042a54
cmp rax, 1
cmp eax, 1
je 0x1400348f4
mov rsi, rax
test rax, rax
test eax, eax
jne case.0x140034a24.99
movzx eax, byte [0x140054188]
mov ecx, 0x18
add byte [rdx + 8], bh
call fcn.140002ca0
test rax, rax
ror byte [rdi], 0x84
pushfq
add byte [rax], al
invalid
mov rsi, rax
lea rax, [0x140045078]
add dword [rax], eax
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x140045090]
test ecx, ecx
je 0x140034926
dec ecx
mov rdx, rsi
call fcn.140042a5c
lea rdi, [rsi + 0x10]
mov rcx, qword [rsi + 0x10]
cmp qword [rsi + 8], 0
mov qword [rsi + 8], 1
mov qword [rsi + 0x10], 0
je 0x1400348f6
test rcx, rcx
je 0x1400348f6
lock dec qword [rcx]
jne 0x1400348f6
call fcn.140034130
jmp 0x1400348f6
xor edi, edi
mov rax, rdi
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, [0x140045078]
call fcn.140037b00
mov ecx, eax
jmp 0x140034836
lea rcx, [0x140045078]
call fcn.140037b00
mov ecx, eax
jmp 0x140034864
lea rcx, [0x140045078]
call fcn.140037b00
mov ecx, eax
jmp 0x1400348bb
mov ecx, 8
mov edx, 0x18
call fcn.140003cb0
ud2
Function at 0x140037b00
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x60
mov rsi, rcx
cmp qword [rcx], 0
je 0x140037b85
mov dword [rsp + 0x2c], 0
lea rbx, [rsi + 0x10]
lea r8, [rsp + 0x2c]
mov rcx, rbx
xor edx, edx
xor r9d, r9d
call sub.kernel32.dll_InitOnceBeginInitialize
mov dword [rsp + 0x28], eax
cmp eax, 1
jne 0x140037bc6
cmp dword [rsp + 0x2c], 0
je 0x140037baa
call sub.kernel32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x140037be0
mov edi, eax
inc eax
mov dword [rsi + 0x18], eax
mov rax, qword [0x140054158]
nop
mov qword [rsi + 8], rax
lock cmpxchg qword [0x140054158], rsi
jne 0x140037b60
mov byte [0x140054151], 1
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call sub.kernel32.dll_InitOnceComplete
jmp 0x140037bbc
call sub.kernel32.dll_TlsAlloc
mov dword [rsp + 0x28], eax
cmp eax, 0xffffffff
je 0x140037c2c
mov ecx, eax
inc ecx
xor eax, eax
lock cmpxchg dword [rsi + 0x18], ecx
jne 0x140037baf
mov edi, dword [rsp + 0x28]
jmp 0x140037bbc
mov edi, dword [rsi + 0x18]
jmp 0x140037bba
mov edi, eax
mov ecx, dword [rsp + 0x28]
call sub.kernel32.dll_TlsFree
dec edi
mov eax, edi
add rsp, 0x60
pop rbx
pop rdi
pop rsi
ret
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x30]
call fcn.14001efc0
ud2
mov rcx, rbx
mov edx, 4
xor r8d, r8d
call sub.kernel32.dll_InitOnceComplete
lea rax, str.out_of_TLS_indexes
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 1
lea rax, [0x14004e920]
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
lea rdx, str.library_std_src_syswindows_thread_local_key.rs
lea rcx, [rsp + 0x30]
call fcn.14000a240
ud2
lea rax, str.out_of_TLS_indexes
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 1
lea rax, [0x14004e920]
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x30]
call fcn.14001f010
ud2
Function at 0x140041230
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x498
mov rsi, rcx
lea rcx, [rsp + 0x98]
mov r8d, 0xe
call fcn.140041510
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14004139b
mov qword [rsp + 0x38], rsi
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 2
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
mov r8d, 0x200
mov eax, 2
mov qword [rsp + 0x28], rax
xor ebx, ebx
mov esi, 0xffffffff
xor r14d, r14d
xor r13d, r13d
cmp r8, 0x201
jae 0x1400412f0
jmp 0x1400412cf
jae 0x1400413ae
cmp r8, 0x201
jae 0x1400412f0
mov edi, 0x200
lea rbp, [rsp + 0x98]
mov r12, r8
jmp 0x140041337
sub r8, r13
sub r14, r13
cmp r14, r8
jae 0x140041317
lea rcx, [rsp + 0x48]
mov rdx, r13
call fcn.140031470
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov rbx, qword [rsp + 0x50]
cmp rbx, rsi
mov r13d, 0xffffffff
cmovb r13, rbx
mov qword [rsp + 0x58], r13
mov r14, rbx
mov rdi, r13
mov rbp, qword [rsp + 0x28]
mov r12, r13
xor ecx, ecx
call sub.kernel32.dll_SetLastError
mov rcx, qword [rsp + 0x30]
mov rdx, rbp
mov r8d, r12d
call sub.kernel32.dll_GetEnvironmentVariableW
mov r15d, eax
test eax, eax
jne 0x140041362
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x140041472
mov r8d, r15d
cmp r12, r8
jne 0x1400412c0
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x140041492
add r12, r12
cmp r12, rsi
cmovae r12, rsi
mov r8, r12
cmp r8, 0x201
jb 0x1400412cf
jmp 0x1400412f0
mov rcx, qword [rsp + 0xa0]
call fcn.140040ac0
mov byte [rsi + 0x18], 2
jmp 0x14004142d
cmp rdi, r8
jb 0x1400414ac
lea rcx, [rsp + 0x60]
mov rdx, rbp
call fcn.140033970
mov rdi, qword [rsp + 0x60]
movups xmm0, xmmword [rsp + 0x68]
movaps xmmword [rsp + 0x80], xmm0
movzx esi, byte [rsp + 0x78]
mov eax, dword [rsp + 0x79]
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x7c]
mov dword [rsp + 0x23], eax
test rbx, rbx
je 0x1400413ff
mov edx, 2
mov rcx, qword [rsp + 0x28]
call fcn.140002d30
cmp sil, 2
jne 0x140041442
mov rax, qword [rsp + 0x38]
mov byte [rax + 0x18], 2
mov rcx, rdi
call fcn.140040ac0
cmp qword [rsp + 0x40], 0
je 0x14004142d
mov edx, 2
mov rcx, qword [rsp + 0x30]
call fcn.140002d30
nop
add rsp, 0x498
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, qword [rsp + 0x38]
mov qword [rdx], rdi
movaps xmm0, xmmword [rsp + 0x80]
movups xmmword [rdx + 8], xmm0
mov byte [rdx + 0x18], sil
mov eax, dword [rsp + 0x20]
mov ecx, dword [rsp + 0x23]
mov dword [rdx + 0x19], eax
mov dword [rdx + 0x1c], ecx
cmp qword [rsp + 0x40], 0
jne 0x14004141e
jmp 0x14004142d
call sub.kernel32.dll_GetLastError
mov edi, eax
shl rdi, 0x20
or rdi, 2
mov sil, 2
test rbx, rbx
jne 0x1400413f0
jmp 0x1400413ff
lea rcx, str.internal_error:_entered_unreachable_codeN
lea r8, str.library_std_src_syswindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov edx, 0x28
call fcn.14000a340
jmp 0x1400414c1
lea rax, str.library_std_src_syswindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov rcx, r8
mov rdx, rdi
mov r8, rax
call fcn.14000ae60
ud2
Function at 0x140042350
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rsi
sub rsp, 0x80
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
lea rcx, [rsp + 0x30]
mov edx, 0x10
call sub.advapi32.dll_SystemFunction036
test al, al
je 0x140042386
mov rax, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
add rsp, 0x80
pop rsi
ret
call sub.kernel32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x28]
mov qword [rsp + 0x40], rax
lea rax, [0x140036c30]
mov qword [rsp + 0x48], rax
lea rax, str.fallback_RNG_broken:
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 1
mov qword [rsp + 0x70], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 1
lea rdx, str.library_std_src_syswindows_rand.rs
lea rcx, [rsp + 0x50]
call fcn.14000a240
ud2

Function at 0x1400435c0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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.140044390
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.140044390
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 0x140043630
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140054204]
mov rbx, rcx
test esi, esi
jle 0x140043760
mov rax, qword [0x140054208]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14004367b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140043705
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140043660
mov rcx, rbx
call fcn.1400440b0
mov rdi, rax
test rax, rax
je 0x140043782
mov rax, qword [0x140054208]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.1400441f0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140054208]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140043767
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400436fe
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140043710
add dword [0x140054204], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x140054208]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400436fe
call qword [sym.imp.kernel32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400435c0
nop dword [rax]
xor esi, esi
jmp 0x140043688
mov rax, qword [0x140054208]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.1400435c0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.1400435c0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140043d20
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140054260]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140054240]
test rbx, rbx
je 0x140043d7c
mov rbp, qword [sym.imp.kernel32.dll_TlsGetValue]
mov rdi, qword [sym.imp.kernel32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x140043d73
test eax, eax
jne 0x140043d73
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140043d58
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x1400440b0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14004eda0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400440d0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400440d8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400440d0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14004412d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140044124
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400440d0
add rax, 0x28
cmp rax, r9
jne 0x140044110
xor eax, eax
ret

Function at 0x140044130
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14004eda0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14004414f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140044158
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14004414f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x1400441f0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14004eda0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14004420f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140044218
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x14000a9b0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x90
mov rax, qword [section..data]
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
mov edi, 0x28
test dl, dl
je 0x14000aa55
nop
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14000aa0d
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14000aa00
cmp rcx, 1
jb 0x14000aa86
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 0x14000aa23
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.140010480
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14000a9f0
mov rdx, rbp
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14000c990
mov rbx, qword [rsp + 0xc0]
add rsp, 0x90
pop rdi
pop rsi
pop rbp
ret
call fcn.140010144
int3

Function at 0x14000ab10
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x250
mov rax, qword [section..data]
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 0x14000ab55
xor al, al
jmp 0x14000aba2
cmp word [rbx], 0
je 0x14000ab6d
nop dword [rax + rax]
add rbx, 2
dec rdi
cmp word [rbx], 0
jne 0x14000ab60
cmp word [rsp + 0x30], 0
je 0x14000ab9b
lea rcx, [rsp + 0x30]
sub rcx, rbx
nop dword [rax]
cmp rdi, 1
jb 0x14000abc3
movzx eax, word [rcx + rbx]
dec rdi
mov word [rbx], ax
add rbx, 2
cmp word [rcx + rbx], 0
jne 0x14000ab80
xor eax, eax
mov word [rbx], ax
mov al, 1
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.14000c990
mov rbx, qword [rsp + 0x270]
add rsp, 0x250
pop rdi
ret
call fcn.140010144
int3