joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001ae34
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
movsxd rbp, ecx
mov r9, r8
mov rax, rbp
lea rcx, [0x14004ca30]
and eax, 0x3f
mov r10, rbp
sar r10, 6
xor edi, edi
mov rsi, rdx
mov r14, rbp
lea r8, [rax + rax*8]
mov rax, qword [rcx + r10*8]
mov ecx, 4
mov qword [rsp + 0x78], rcx
mov r11, qword [rax + r8*8 + 0x28]
lea r12d, [rcx + 6]
test r9, r9
je 0x14001ae92
cmp word [rdx], r12w
jne 0x14001ae92
or byte [rax + r8*8 + 0x38], cl
jmp 0x14001ae98
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x14001aff3
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x14001afce
lea r9, [rcx + 2]
cmp ax, r13w
je 0x14001aed1
mov rcx, r9
jmp 0x14001aef4
cmp r9, rdx
jae 0x14001af0b
cmp word [r9], r12w
mov eax, 2
cmove rax, qword [rsp + 0x78]
add rcx, rax
mov eax, r12d
cmp word [r9], r12w
cmovne ax, r13w
mov word [rbx], ax
mov r9d, 0x1a
add rbx, 2
cmp rcx, rdx
jb 0x14001aeb5
jmp 0x14001aff3
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14001afc8
cmp dword [rsp + 0x80], edi
je 0x14001afc8
mov rdx, r14
lea r11, [0x14004ca30]
sar rdx, 6
and r14d, 0x3f
mov rax, qword [r11 + rdx*8]
lea r8, [r14 + r14*8]
test byte [rax + r8*8 + 0x38], 0x48
je 0x14001afa1
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x14001af74
mov word [rbx], r12w
jmp 0x14001afef
mov word [rbx], r13w
mov word [rsp + 0x78], ax
mov rax, qword [r11 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, 2
jl 0x14001af7d
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x14001afef
cmp word [rsp + 0x70], r12w
jne 0x14001afae
cmp rbx, rsi
je 0x14001af6e
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.14001bc2c
cmp word [rsp + 0x70], r12w
je 0x14001aff3
mov word [rbx], r13w
jmp 0x14001afef
lea r11, [0x14004ca30]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x14001afeb
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x14001aff3
mov word [rbx], r9w
add rbx, 2
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x14001b848
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
mov rsi, rcx
test rcx, rcx
jne 0x14001b87a
call fcn.140014934
mov dword [rax], 0x16
call fcn.14001a270
jmp 0x14001b999
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x14001b999
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x14001b999
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x14001b8a9
lock or dword [rcx + 0x14], 0x10
jmp 0x14001b999
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x14001b8bd
call fcn.140022f18
mov rdi, qword [rsi + 8]
mov rcx, rsi
mov ebx, dword [rsi + 0x20]
mov qword [rsi], rdi
call fcn.140019654
mov r8d, ebx
mov rdx, rdi
mov ecx, eax
call fcn.14001b2e0
mov dword [rsi + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 1
jbe 0x14001b987
mov eax, dword [rsi + 0x14]
or edi, 0xffffffff
test al, 6
jne 0x14001b952
mov rcx, rsi
call fcn.140019654
cmp eax, edi
je 0x14001b93d
mov rcx, rsi
call fcn.140019654
cmp eax, 0xfffffffe
je 0x14001b93d
mov rcx, rsi
call fcn.140019654
movsxd rbx, eax
lea r14, [0x14004ca30]
mov rcx, rsi
sar rbx, 6
call fcn.140019654
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rbx*8]
lea rdx, [rax + rcx*8]
jmp 0x14001b944
lea rdx, [0x14003d3e0]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x14001b952
lock or dword [rsi + 0x14], 0x20
cmp dword [rsi + 0x20], 0x200
jne 0x14001b976
mov eax, dword [rsi + 0x14]
shr eax, 6
test al, 1
je 0x14001b976
mov eax, dword [rsi + 0x14]
shr eax, 8
test al, 1
jne 0x14001b976
mov dword [rsi + 0x20], 0x1000
mov rax, qword [rsi]
add dword [rsi + 0x10], edi
movzx edi, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x14001b99c
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rsi + 0x14], eax
and dword [rsi + 0x10], 0
or edi, 0xffffffff
mov rbx, qword [rsp + 0x30]
mov eax, edi
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop r14
ret
Function at 0x140021f0c
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 0x140021f3c
xor eax, eax
jmp 0x140021fff
mov rbp, rbx
cmp word [rax], si
je 0x140021f61
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140021f48
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140021f44
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.14001f594
movsxd r14, eax
test eax, eax
jne 0x140021f9f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140021f35
mov rcx, r14
call fcn.14001cfc0
mov rdi, rax
test rax, rax
jne 0x140021fb8
xor ecx, ecx
call fcn.14001a2d8
jmp 0x140021f94
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.14001f594
test eax, eax
jne 0x140021fe9
mov rcx, rdi
call fcn.14001a2d8
jmp 0x140021ff3
xor ecx, ecx
call fcn.14001a2d8
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 0x14002201c
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 0x1400220a3
mov rsi, rbx
cmp word [rax], bp
je 0x140022062
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14002204c
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140022048
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14001cfc0
mov rdi, rax
test rax, rax
je 0x140022090
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14000c1c0
mov rbp, rdi
xor ecx, ecx
call fcn.14001a2d8
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 0x140026970
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.140014f0c
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400269fa
cmp byte [rbp - 0x21], r15b
je 0x1400269f5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140026a30
call fcn.14001e4e0
test eax, eax
jne 0x140026a1c
cmp byte [rbp - 0x21], r15b
je 0x140026a14
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140026a30
cmp byte [rbp - 0x21], r15b
je 0x140026a2d
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.1400149f4
test eax, eax
jne 0x140026ad0
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140014f0c
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140026a6f
cmp byte [rbp - 0x21], r15b
je 0x140026aa4
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140026aa4
call fcn.14001e4e0
test eax, eax
jne 0x140026a90
cmp byte [rbp - 0x21], r15b
je 0x140026a89
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140026aa4
cmp byte [rbp - 0x21], r15b
je 0x140026aa1
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.1400149f4
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140026ad0
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140026ad3
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140026ae1
mov rcx, rdi
call fcn.14001a2d8
cmp byte [rbp + 0x3f], r15b
je 0x140026af0
mov rcx, qword [rbp + 0x27]
call fcn.14001a2d8
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 0x140028144
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.14001bc2c
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001bc2c
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140028294
cmp rax, 0xffffffffffffffff
je 0x140028294
xor edi, edi
test rbp, rbp
jle 0x14002823f
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14001e250
mov rbx, rax
test rax, rax
jne 0x1400281cc
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140028235
mov edx, 0x8000
mov ecx, r14d
call fcn.140015dd0
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.14001c92c
cmp eax, 0xffffffff
je 0x140028215
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1400281dc
mov edx, r15d
mov ecx, r14d
call fcn.140015dd0
jmp 0x140028235
cmp byte [rsi + 0x38], dil
je 0x14002822c
cmp dword [rsi + 0x34], 5
jne 0x14002822c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140028235
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14001a2d8
jmp 0x1400282a8
jns 0x1400282a8
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001bc2c
cmp rax, 0xffffffffffffffff
jne 0x140028260
cmp byte [rsi + 0x30], dil
je 0x1400282a8
mov edi, dword [rsi + 0x2c]
jmp 0x1400282a8
mov ecx, r14d
call fcn.1400173c8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1400282a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x1400282a8
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1400282a1
mov eax, dword [rsi + 0x2c]
jmp 0x1400282a6
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001bc2c
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x18000d810
Capabilities:
Access peb ldr_data
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x10]
mov r10, qword [rax + 0x30]
movsxd rcx, dword [r10 + 0x3c]
mov ebx, dword [rcx + r10 + 0x88]
add rbx, r10
cmp rbx, r10
je 0x18000d8a7
mov r9d, dword [rbx + 0x18]
test r9d, r9d
je 0x18000d8a7
mov edi, dword [rbx + 0x20]
nop dword [rax]
nop dword [rax + rax]
dec r9d
mov r8d, 0x1b213a69
lea rcx, [rdi + r9*4]
mov ecx, dword [rcx + r10]
add rcx, r10
movzx edx, byte [rcx]
inc rcx
test dl, dl
je 0x18000d8a2
nop
movsx edx, dl
lea rcx, [rcx + 1]
xor edx, r8d
imul r8d, edx, 0x1000193
movzx edx, byte [rcx - 1]
test dl, dl
jne 0x18000d880
cmp r8d, 0x918652f
je 0x18000d8ac
test r9d, r9d
jne 0x18000d860
mov rax, qword [rax]
jmp 0x18000d830
mov ecx, dword [rbx + 0x24]
add rcx, r10
movzx edx, word [rcx + r9*2]
mov ecx, dword [rbx + 0x1c]
add rcx, r10
mov eax, dword [rcx + rdx*4]
xor ecx, ecx
add rax, r10
call rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, qword gs:[0x60]
mov rsi, rax
mov rcx, qword [rcx + 0x18]
mov rcx, qword [rcx + 0x10]
nop dword [rax]
nop word [rax + rax]
mov r10, qword [rcx + 0x30]
movsxd rdx, dword [r10 + 0x3c]
mov ebx, dword [rdx + r10 + 0x88]
add rbx, r10
cmp rbx, r10
je 0x18000d967
mov r9d, dword [rbx + 0x18]
test r9d, r9d
je 0x18000d967
mov edi, dword [rbx + 0x20]
nop dword [rax]
nop dword [rax + rax]
dec r9d
mov r8d, 0x2a23909d
lea rax, [rdi + r9*4]
mov edx, dword [rax + r10]
add rdx, r10
movzx eax, byte [rdx]
inc rdx
test al, al
je 0x18000d962
nop
movsx eax, al
lea rdx, [rdx + 1]
xor eax, r8d
imul r8d, eax, 0x1000193
movzx eax, byte [rdx - 1]
test al, al
jne 0x18000d940
cmp r8d, 0xa9da4c91
je 0x18000d96c
test r9d, r9d
jne 0x18000d920
mov rcx, qword [rcx]
jmp 0x18000d8f0
mov ecx, dword [rbx + 0x24]
add rcx, r10
movzx edx, word [rcx + r9*2]
mov ecx, dword [rbx + 0x1c]
add rcx, r10
mov eax, dword [rcx + rdx*4]
xor edx, edx
add rax, r10
mov rcx, rsi
call rax
mov rbx, qword [rsp + 0x30]
mov eax, 0xdeadbeef
mov rsi, qword [rsp + 0x38]
mov qword [0], rax
add rsp, 0x20
pop rdi
ret
Function at 0x18000dcf0
Capabilities:
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
push rsi
sub rsp, 0x30
mov esi, ecx
test ecx, ecx
je 0x18000dd05
cmp ecx, 3
jne 0x18000ddd6
mov rax, qword gs:[0x60]
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rdi
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x10]
mov r10, qword [rax + 0x30]
movsxd rcx, dword [r10 + 0x3c]
mov ebx, dword [rcx + r10 + 0x88]
add rbx, r10
cmp rbx, r10
je 0x18000dd97
mov r9d, dword [rbx + 0x18]
test r9d, r9d
je 0x18000dd97
mov edi, dword [rbx + 0x20]
nop dword [rax]
nop dword [rax + rax]
dec r9d
mov r8d, 0x17255cc0
lea rcx, [rdi + r9*4]
mov ecx, dword [rcx + r10]
add rcx, r10
movzx edx, byte [rcx]
inc rcx
test dl, dl
je 0x18000dd92
nop
movsx edx, dl
lea rcx, [rcx + 1]
xor edx, r8d
imul r8d, edx, 0x1000193
movzx edx, byte [rcx - 1]
test dl, dl
jne 0x18000dd70
cmp r8d, 0x42bdbdbc
je 0x18000dd9c
test r9d, r9d
jne 0x18000dd50
mov rax, qword [rax]
jmp 0x18000dd20
mov ecx, dword [rbx + 0x24]
lea r8, [0x18000d9b0]
add rcx, r10
movzx edx, word [rcx + r9*2]
xor r9d, r9d
mov ecx, dword [rbx + 0x1c]
add rcx, r10
mov eax, dword [rcx + rdx*4]
xor ecx, ecx
mov qword [rsp + 0x28], rcx
add rax, r10
xor edx, edx
mov dword [rsp + 0x20], ecx
call rax
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
cmp esi, 1
je 0x18000dde0
cmp esi, 4
jne 0x18000ddea
add rsp, 0x30
pop rsi
jmp fcn.18000d810
add rsp, 0x30
pop rsi
ret
Function at 0x180011f20
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x70
mov rax, qword [0x180153498]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rbx, rdx
mov rsi, rcx
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x48], rdx
xor r14d, r14d
mov rcx, rdx
cmp qword [rdx + 0x18], 0x10
jb 0x180011f61
mov rcx, qword [rdx]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x180012024
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], r14
mov qword [rsi + 0x18], r14
xor r8d, r8d
lea rdx, [0x18013a958]
mov rcx, rsi
call fcn.180005fd0
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 0x10
jb 0x180011ff0
inc rdx
mov rcx, qword [rbx]
cmp rdx, 0x1000
jb 0x180011feb
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x18001207d
mov rcx, r8
call fcn.1800f2190
mov rax, rsi
mov byte [rbx], 0
mov qword [rbx + 0x18], reloc.WS2_32.dll_ntohs
mov qword [rbx + 0x10], r14
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.1800f2170
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r9, [rsp + 0x65]
nop
dec r9
mov eax, 0xcccccccd
mul edi
shr edx, 3
movzx eax, dl
shl al, 2
lea ecx, [rax + rdx]
add cl, cl
sub dil, cl
add dil, 0x30
mov byte [r9], dil
mov edi, edx
test edx, edx
jne 0x180012040
lea r8, [rsp + 0x65]
mov rdx, r9
mov rcx, rsi
call fcn.180056b90
jmp 0x180011fb6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
Function at 0x180015580
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x20
lea rcx, str.discord_rpc_bak.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
test rax, rax
je 0x1800156ca
lea rdx, [0x18012ad18]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x18012ad30]
mov rcx, rbx
mov qword [0x180156fa8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x18012ad50]
mov rcx, rbx
mov qword [0x180156fa0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x18012ad68]
mov rcx, rbx
mov qword [0x180156f98], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x18012ad80]
mov rcx, rbx
mov qword [0x180156f90], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x18012ad98]
mov rcx, rbx
mov qword [0x180156f88], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x18012adb0]
mov rcx, rbx
mov qword [0x180156f80], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x18012adc8]
mov rcx, rbx
mov qword [0x180156f78], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x18012add8]
mov rcx, rbx
mov qword [0x180156f70], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x180156fa8], 0
mov qword [0x180156f68], rax
je 0x1800156ca
cmp qword [0x180156fa0], 0
je 0x1800156ca
cmp qword [0x180156f98], 0
je 0x1800156ca
cmp qword [0x180156f90], 0
je 0x1800156ca
cmp qword [0x180156f88], 0
je 0x1800156ca
cmp qword [0x180156f80], 0
je 0x1800156ca
cmp qword [0x180156f78], 0
je 0x1800156ca
cmp qword [0x180156f70], 0
je 0x1800156ca
test rax, rax
setne al
add rsp, 0x20
pop rbx
ret
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x18001e450
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
mov edx, dword [rcx + 0x10]
mov rbx, rcx
mov edi, edx
and edi, 7
je 0x18001e4e4
cmp edx, edi
jge 0x18001e4d5
mov r8d, dword [rcx + 0x14]
mov eax, 1
mov ecx, edx
mov r10d, edx
shl eax, cl
mov r9d, edx
cmp r8d, eax
jae 0x18001e4cb
mov r11, qword [rbx + 8]
mov rax, qword [rbx]
cmp rax, r11
jb 0x18001e493
xor cl, cl
jmp 0x18001e49c
movzx ecx, byte [rax]
inc rax
mov qword [rbx], rax
movzx eax, cl
lea edx, [r10 + 8]
mov ecx, r10d
mov dword [rbx + 0x10], edx
shl eax, cl
or r8d, eax
mov dword [rbx + 0x14], r8d
cmp edx, 0x18
jg 0x18001e4d5
mov ecx, edx
mov eax, 1
shl eax, cl
mov r10d, edx
mov r9d, edx
cmp r8d, eax
jb 0x18001e487
mov rax, qword [rbx + 8]
mov edx, r9d
mov qword [rbx], rax
mov eax, dword [rbx + 0x14]
mov ecx, edi
shr eax, cl
sub edx, edi
mov dword [rbx + 0x14], eax
mov dword [rbx + 0x10], edx
xor r8d, r8d
mov eax, edx
test edx, edx
jle 0x18001e51e
mov ecx, dword [rbx + 0x14]
lea rdx, [rsp + 0x30]
movzx r9d, cl
nop dword [rax]
shr ecx, 8
inc r8d
mov byte [rdx], r9b
lea rdx, [rdx + 1]
sub eax, 8
mov dword [rbx + 0x14], ecx
movzx r9d, cl
test eax, eax
jg 0x18001e500
mov dword [rbx + 0x10], eax
test eax, eax
jns 0x18001e552
mov edx, dword [0x180156de4]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.zlib_corrupt
mov qword [rcx + rax], rdx
xor eax, eax
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
movsxd rcx, r8d
cmp rcx, 4
jge 0x18001e581
mov r8, qword [rbx + 8]
mov rax, qword [rbx]
cmp rax, r8
jb 0x18001e56b
xor dl, dl
jmp 0x18001e574
movzx edx, byte [rax]
inc rax
mov qword [rbx], rax
mov byte [rsp + rcx + 0x30], dl
inc rcx
cmp rcx, 4
jl 0x18001e562
movzx eax, byte [rsp + 0x30]
movzx r8d, byte [rsp + 0x31]
movzx ecx, byte [rsp + 0x33]
shl r8d, 8
add r8d, eax
shl ecx, 8
movzx eax, byte [rsp + 0x32]
add ecx, eax
mov eax, r8d
xor eax, 0xffff
cmp ecx, eax
jne 0x18001e522
mov rcx, qword [rbx]
mov edi, r8d
add rcx, rdi
cmp rcx, qword [rbx + 8]
jbe 0x18001e5f1
mov edx, dword [0x180156de4]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.read_past_buffer
mov qword [rcx + rax], rdx
xor eax, eax
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov rdx, qword [rbx + 0x18]
lea rax, [r8 + rdx]
cmp rax, qword [rbx + 0x28]
jbe 0x18001e60f
mov rcx, rbx
call fcn.18001d890
test eax, eax
je 0x18001e545
mov rdx, qword [rbx]
mov r8, rdi
mov rcx, qword [rbx + 0x18]
call sub.VCRUNTIME140.dll_memcpy
add qword [rbx], rdi
mov eax, 1
add qword [rbx + 0x18], rdi
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret