joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140021ac4
Capabilities:
Parse pe header

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

Function at 0x140027128
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 0x140027197
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140027197
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140027197
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140027197
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140027197
cmp dword [rcx + 0x84], 0xe
jbe 0x140027197
cmp dword [rcx + 0xf8], 0
je 0x140027197
mov ecx, ebx
call fcn.140027248
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.140027024
nop
cmp dword [rbp + 0x20], 0
je 0x1400271e5
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.1400271f0
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x140027128

Function at 0x14002732c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140027128
Function at 0x14002bcc8
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x14002bcf8
xor eax, eax
jmp 0x14002bdbb
mov rbp, rbx
cmp word [rax], si
je 0x14002bd1d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14002bd04
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14002bd00
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.14002bbe8
movsxd r14, eax
test eax, eax
jne 0x14002bd5b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14002bcf1
mov rcx, r14
call fcn.140028168
mov rdi, rax
test rax, rax
jne 0x14002bd74
xor ecx, ecx
call fcn.14002812c
jmp 0x14002bd50
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.14002bbe8
test eax, eax
jne 0x14002bda5
mov rcx, rdi
call fcn.14002812c
jmp 0x14002bdaf
xor ecx, ecx
call fcn.14002812c
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x140030960
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.14002acb8
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400309ea
cmp byte [rbp - 0x21], r15b
je 0x1400309e5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140030a20
call fcn.14002d0e0
test eax, eax
jne 0x140030a0c
cmp byte [rbp - 0x21], r15b
je 0x140030a04
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140030a20
cmp byte [rbp - 0x21], r15b
je 0x140030a1d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.14002a298
test eax, eax
jne 0x140030ac0
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14002acb8
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140030a5f
cmp byte [rbp - 0x21], r15b
je 0x140030a94
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140030a94
call fcn.14002d0e0
test eax, eax
jne 0x140030a80
cmp byte [rbp - 0x21], r15b
je 0x140030a79
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140030a94
cmp byte [rbp - 0x21], r15b
je 0x140030a91
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.14002a298
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140030ac0
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140030ac3
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140030ad1
mov rcx, rdi
call fcn.14002812c
cmp byte [rbp + 0x3f], r15b
je 0x140030ae0
mov rcx, qword [rbp + 0x27]
call fcn.14002812c
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x140033dd0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140033df8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140033df8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x180630058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1806301df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x180630089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x18063006f
add dl, dl
jne 0x180630096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1806300f6
xor eax, eax
add dl, dl
jne 0x1806300a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1806301ad
add dl, dl
jne 0x1806300b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806300c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806300d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806300dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1806300ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x18063007e
mov eax, 1
add dl, dl
jne 0x180630106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x180630113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1806300fb
sub eax, ebx
mov ebx, 1
jne 0x18063014c
mov ecx, 1
add dl, dl
jne 0x18063012e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x18063013b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x180630123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18063007e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x180630168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x180630175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x18063015d
cmp eax, 0x7d00
jae 0x18063019b
cmp eax, 0x500
jb 0x180630196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18063007e
cmp eax, 0x7f
ja 0x18063019e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18063007e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1806301d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x18063007e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x14090c108
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.14090c28f
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x14090c139
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14090c11f
add dl, dl
jne 0x14090c146
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14090c1a6
xor eax, eax
add dl, dl
jne 0x14090c155
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14090c25d
add dl, dl
jne 0x14090c166
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14090c173
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14090c180
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14090c18d
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14090c19a
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14090c12e
mov eax, 1
add dl, dl
jne 0x14090c1b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14090c1c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14090c1ab
sub eax, ebx
mov ebx, 1
jne 0x14090c1fc
mov ecx, 1
add dl, dl
jne 0x14090c1de
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14090c1eb
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14090c1d3
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14090c12e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x14090c218
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14090c225
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14090c20d
cmp eax, 0x7d00
jae 0x14090c24b
cmp eax, 0x500
jb 0x14090c246
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14090c12e
cmp eax, 0x7f
ja 0x14090c24e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14090c12e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x14090c282
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x14090c12e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001430
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov dword [rsp + 0x10], edx
push rdi
sub rsp, 0x50
mov rbx, r9
mov dword [rsp + 0x20], 0xf0000000
mov rdi, r8
mov rsi, rcx
mov r9d, 0x18
lea rcx, [rsp + 0x30]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140001537
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, 0x800c
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140001537
mov rcx, qword [rsp + 0x38]
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x140001537
mov r8, qword [rsp + 0x38]
lea rax, [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
xor r9d, r9d
mov edx, 0x6610
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
je 0x140001537
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rsi
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140001537
mov rcx, qword [rsp + 0x30]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
mov rbx, qword [rsp + 0x60]
mov eax, 0xffffffff
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret

Function at 0x140005984
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x1400057b0
Function at 0x2fc4ca5a0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x2fc4cafa2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4ef108]
test eax, eax
je 0x2fc4cb03a
lea rax, [0x2fc4ef0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4ef110]
mov qword [rbp - 8], rax
jmp 0x2fc4cb01e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x2fc4cb012
cmp qword [rbp - 0x10], 0
je 0x2fc4cb012
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x2fc4cafd8
lea rax, [0x2fc4ef0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4cb03b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4cb140
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x2fc4cb168
mov eax, 0
jmp 0x2fc4cb1b6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x2fc4cb191
mov eax, 0
jmp 0x2fc4cb1b6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x2fc4cb1b1
mov eax, 0
jmp 0x2fc4cb1b6
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4cb1bc
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x2fc4cb23a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4cb231
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x2fc4cb231
mov rax, qword [rbp - 8]
jmp 0x2fc4cb24f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x2fc4cb204
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001660
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x118
mov qword [rsp + 0x28], rcx
mov rax, rcx
mov qword [rsp + 0x30], rax
mov qword [rsp + 0xd0], rcx
lea rcx, str.APPDATA
call sub.msvcrt.dll_getenv
mov qword [rsp + 0xc8], rax
cmp qword [rsp + 0xc8], 0
jne 0x1400016b5
mov rcx, qword [rsp + 0x28]
mov dl, byte [rsp + 0xc7]
call fcn.14008c960
jmp 0x140001878
mov rdx, qword [rsp + 0xc8]
lea r8, [rsp + 0x9f]
mov qword [rsp + 0xd8], r8
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0x110], rax
lea rcx, [rsp + 0xa0]
call fcn.14007bf30
jmp 0x1400016ef
lea rax, [rsp + 0x9f]
mov qword [rsp + 0xe8], rax
mov rcx, qword [rsp + 0xe8]
call fcn.140070ee0
lea r8, [rsp + 0x67]
mov qword [rsp + 0xe0], r8
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x108], rax
lea rdx, str.Discord_Local_Storage_leveldb
lea rcx, [rsp + 0x68]
call fcn.14007bf30
jmp 0x14000173f
lea rax, [rsp + 0x67]
mov qword [rsp + 0xf8], rax
mov rcx, qword [rsp + 0xf8]
call fcn.140070ee0
lea rcx, [rsp + 0x38]
lea rdx, [rsp + 0xa0]
mov r8b, 2
call fcn.140068180
jmp 0x140001773
lea rcx, [rsp + 0x38]
lea rdx, [rsp + 0x68]
call fcn.140067f70
jmp 0x140001787
mov rcx, qword [rsp + 0x28]
lea rdx, [rsp + 0x38]
call fcn.14008c980
lea rcx, [rsp + 0x38]
call fcn.140068250
lea rcx, [rsp + 0x68]
call fcn.140002b28
lea rcx, [rsp + 0xa0]
call fcn.140002b28
jmp 0x140001878
mov rax, qword [rsp + 0x30]
add rsp, 0x118
ret

Function at 0x140003100
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.140008dc0
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.140008dc0
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 0x140003170
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400c3144]
mov rbx, rcx
test esi, esi
jle 0x1400032a0
mov rax, qword [0x1400c3148]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400031bb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140003245
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400031a0
mov rcx, rbx
call fcn.140003bc0
mov rdi, rax
test rax, rax
je 0x1400032c2
mov rax, qword [0x1400c3148]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140003d00
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400c3148]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400032a7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000323e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140003250
add dword [0x1400c3144], 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 [0x1400c3148]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000323e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140003100
nop dword [rax]
xor esi, esi
jmp 0x1400031c8
mov rax, qword [0x1400c3148]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140003100
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140003100
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140003830
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1400c31a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400c3180]
test rbx, rbx
je 0x14000388c
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 eax, eax
jne 0x140003883
test rsi, rsi
je 0x140003883
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003868
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 0x140003bc0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14009dd40]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140003be0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140003be8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140003be0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x140003c3d
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 0x140003c34
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140003be0
add rax, 0x28
cmp rax, r9
jne 0x140003c20
xor eax, eax
ret

Function at 0x140003c40
Capabilities:
Parse pe header

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

Function at 0x140003d00
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14009dd40]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140003d1f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140003d28
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140011220
Capabilities:
Get socket status

Disassembly:
sub rsp, 0x278
mov qword [rsp + 0x268], rcx
mov byte [rsp + 0x267], dl
mov dword [rsp + 0x260], r8d
mov qword [rsp + 0x258], r9
cmp qword [rsp + 0x268], 0xffffffffffffffff
jne 0x140011277
mov rcx, qword [rsp + 0x258]
mov edx, 0x2719
call fcn.14004a3d0
mov dword [rsp + 0x274], 0xffffffff
jmp 0x140011417
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x4c], 0
mov eax, dword [rsp + 0x4c]
cmp eax, dword [rsp + 0x50]
jae 0x1400112c6
mov eax, dword [rsp + 0x4c]
mov rax, qword [rsp + rax*8 + 0x58]
cmp rax, qword [rsp + 0x268]
jne 0x1400112b1
jmp 0x1400112c6
jmp 0x1400112b6
mov eax, dword [rsp + 0x4c]
add eax, 1
mov dword [rsp + 0x4c], eax
jmp 0x140011287
mov eax, dword [rsp + 0x4c]
cmp eax, dword [rsp + 0x50]
jne 0x140011300
cmp dword [rsp + 0x50], 0x40
jae 0x1400112fb
mov rcx, qword [rsp + 0x268]
mov eax, dword [rsp + 0x4c]
mov qword [rsp + rax*8 + 0x58], rcx
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
jmp 0x140011300
jmp 0x140011305
movzx eax, byte [rsp + 0x267]
and eax, 1
cmp eax, 0
je 0x140011338
mov dword [rsp + 0x44], 0
mov dword [rsp + 0x48], 0
lea rax, [rsp + 0x44]
mov qword [rsp + 0x38], rax
jmp 0x14001138f
cmp dword [rsp + 0x260], 0
jl 0x140011381
mov eax, dword [rsp + 0x260]
mov ecx, 0x3e8
cdq
idiv ecx
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x260]
mov ecx, 0x3e8
cdq
idiv ecx
imul eax, edx, 0x3e8
mov dword [rsp + 0x48], eax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x38], rax
jmp 0x14001138a
mov qword [rsp + 0x38], 0
jmp 0x14001138f
mov rax, qword [rsp + 0x268]
add rax, 1
mov ecx, eax
mov rax, qword [rsp + 0x38]
xor edx, edx
mov r9d, edx
lea r8, [rsp + 0x50]
mov rdx, r9
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
mov dword [rsp + 0x34], eax
mov rcx, qword [rsp + 0x258]
cmp dword [rsp + 0x34], 0
setl dl
and dl, 1
call fcn.140011bc0
cmp dword [rsp + 0x34], 0
jne 0x14001140c
movzx eax, byte [rsp + 0x267]
and eax, 1
cmp eax, 0
je 0x140011407
mov rcx, qword [rsp + 0x258]
mov edx, 0x2733
call fcn.14004a3d0
jmp 0x14001140c
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x274], eax
mov eax, dword [rsp + 0x274]
add rsp, 0x278
ret