joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18006cd40
Capabilities:
Get system information on windows

Disassembly:
push rsi
push rdi
push r14
push r15
sub rsp, 0x98
mov rax, qword [0x18023c300]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rdi, rcx
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov r14, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x60]
cmp rdi, 0x40000000
jbe 0x18006cd8f
lea rax, [rdi - 0x40000000]
cmp r14, rax
cmovb r14, rax
mov rsi, qword [0x18023dd70]
lea r15, [rdi + 0x40000000]
cmp rcx, r15
cmovbe r15, rcx
sub r15, 0xfff
test rsi, rsi
je 0x18006cdcd
cmp rsi, r14
jb 0x18006cdc5
cmp rsi, r15
jae 0x18006cdc5
cmp qword [rsi + 8], 0
jne 0x18006cf97
mov rsi, qword [rsi]
test rsi, rsi
jne 0x18006cdb0
mov qword [rsp + 0xc8], rbx
mov rbx, rdi
mov qword [rsp + 0xd0], rbp
mov qword [rsp + 0x90], r12
mov r12d, 0x40
cmp rdi, r14
jb 0x18006ce62
nop dword [rax]
nop word [rax + rax]
mov ebp, dword [rsp + 0x78]
mov rax, rbx
xor edx, edx
div rbp
sub rbx, rdx
sub rbx, rbp
cmp rbx, r14
jb 0x18006ce59
nop word [rax + rax]
mov r8d, 0x30
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x18006ce59
cmp dword [rsp + 0x40], 0x10000
je 0x18006cedb
mov rbx, qword [rsp + 0x28]
cmp rbx, rbp
jb 0x18006ce59
sub rbx, rbp
cmp rbx, r14
jae 0x18006ce20
test rsi, rsi
jne 0x18006cf40
cmp rdi, r15
ja 0x18006cf7f
nop dword [rax + rax]
mov ebp, dword [rsp + 0x78]
xor edx, edx
mov rax, rdi
mov ebx, ebp
div rbp
mov eax, ebp
sub rax, rdx
add rax, rdi
mov rdi, rax
cmp rax, r15
ja 0x18006cf7f
mov r8d, 0x30
lea rdx, [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x18006cf7f
cmp dword [rsp + 0x40], 0x10000
je 0x18006cf11
xor edx, edx
lea edi, [rbp - 1]
add rdi, qword [rsp + 0x38]
add rdi, qword [rsp + 0x20]
mov rax, rdi
div rbx
sub rdi, rdx
cmp rdi, r15
jbe 0x18006ce92
jmp 0x18006cf7f
test rbx, rbx
je 0x18006ce59
mov r9d, r12d
mov edx, 0x1000
mov r8d, 0x3000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
jne 0x18006cf40
cmp rbx, r14
jae 0x18006ce00
jmp 0x18006ce62
test rdi, rdi
je 0x18006cf7f
mov r9d, r12d
mov edx, 0x1000
mov r8d, 0x3000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
jne 0x18006cf40
cmp rdi, r15
jbe 0x18006ce70
jmp 0x18006cf7f
xor edx, edx
lea rcx, [rsi + 0x40]
mov dword [rsi + 0x10], edx
nop dword [rax]
mov qword [rcx], rdx
mov rax, rcx
mov qword [rsi + 8], rcx
add r12, 0x40
add rcx, 0x40
mov rdx, rax
cmp r12, 0xfc0
jbe 0x18006cf50
mov rax, qword [0x18023dd70]
mov qword [rsi], rax
mov qword [0x18023dd70], rsi
mov r12, qword [rsp + 0x90]
mov rbp, qword [rsp + 0xd0]
mov rbx, qword [rsp + 0xc8]
mov rax, rsi
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.18006edb0
add rsp, 0x98
pop r15
pop r14
pop rdi
pop rsi
ret
Function at 0x18006d7e0
Capabilities:
Resume thread

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
sub rsp, 0x30
mov r8d, dword [0x18023dd6c]
mov esi, ecx
xor ecx, ecx
mov ebx, ecx
test r8d, r8d
je 0x18006d827
mov rax, qword [0x18023dd60]
add rax, 0x20
nop word [rax + rax]
movzx edx, byte [rax]
shr edx, 1
and edx, 1
cmp edx, esi
jne 0x18006d834
inc ebx
add rax, 0x38
cmp ebx, r8d
jb 0x18006d810
mov eax, ecx
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rsi
ret
cmp ebx, 0xffffffff
je 0x18006d827
test esi, esi
mov qword [rsp + 0x48], rdi
mov edx, 0xffffffff
setne cl
mov r8d, ecx
lea rcx, [rsp + 0x20]
call fcn.18006dcf0
mov edi, eax
test eax, eax
jne 0x18006d91d
mov r9d, dword [0x18023dd6c]
cmp ebx, r9d
jae 0x18006d8ac
nop dword [rax + rax]
mov ecx, ebx
imul rdx, rcx, 0x38
mov rcx, qword [0x18023dd60]
movzx r8d, byte [rdx + rcx + 0x20]
shr r8d, 1
and r8d, 1
cmp r8d, esi
je 0x18006d8a5
mov edx, esi
mov ecx, ebx
call fcn.18006da50
mov edi, eax
test eax, eax
jne 0x18006d8ac
mov r9d, dword [0x18023dd6c]
inc ebx
cmp ebx, r9d
jb 0x18006d870
cmp qword [rsp + 0x20], 0
je 0x18006d91b
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x18006d907
mov rbx, qword [rsp + 0x20]
mov qword [rsp + 0x40], rbp
mov ebp, eax
nop dword [rax + rax]
mov r8d, dword [rbx]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x18006d8f8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rbx, 4
sub rbp, 1
jne 0x18006d8d0
mov rbp, qword [rsp + 0x40]
mov r8, qword [rsp + 0x20]
xor edx, edx
mov rcx, qword [0x18023d758]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rsi
ret
Function at 0x18006da50
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
mov rax, qword [0x18023c300]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov eax, ecx
lea r9, [rsp + 0x20]
imul rbx, rax, 0x38
mov esi, edx
add rbx, qword [0x18023dd60]
mov r8, qword [rbx]
movzx eax, byte [rbx + 0x20]
and al, 1
movzx ecx, al
lea rdi, [r8 - 5]
cmove rdi, r8
mov r8d, 0x40
lea rbp, [rcx*2 + 5]
mov rcx, rdi
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x18006dac3
mov eax, 0xa
jmp 0x18006db56
test esi, esi
je 0x18006dae5
mov byte [rdi], 0xe9
mov eax, dword [rbx + 8]
sub eax, edi
sub eax, 5
mov dword [rdi + 1], eax
test byte [rbx + 0x20], 1
je 0x18006db08
mov rax, qword [rbx]
mov word [rax], 0xf9eb
jmp 0x18006db08
mov eax, dword [rbx + 0x18]
test byte [rbx + 0x20], 1
mov dword [rdi], eax
je 0x18006db01
movzx eax, word [rbx + 0x1c]
mov word [rdi + 4], ax
movzx eax, byte [rbx + 0x1e]
mov byte [rdi + 6], al
jmp 0x18006db08
movzx eax, byte [rbx + 0x1c]
mov byte [rdi + 4], al
mov r8d, dword [rsp + 0x20]
lea r9, [rsp + 0x20]
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r8, rbp
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
movzx ecx, sil
shl sil, 2
add cl, cl
xor cl, byte [rbx + 0x20]
and cl, 2
xor cl, byte [rbx + 0x20]
xor sil, cl
and sil, 4
xor sil, cl
mov byte [rbx + 0x20], sil
xor eax, eax
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.18006edb0
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
Function at 0x18006db80
Capabilities:
Enumerate threads

Disassembly:
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x18023c300]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rdi, rcx
xor esi, esi
xor edx, edx
lea ecx, [rsi + 4]
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x18006dccc
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, rax
call sub.KERNEL32.dll_Thread32First
test eax, eax
je 0x18006dcc3
mov esi, 1
mov qword [rsp + 0x68], rbx
cmp dword [rsp + 0x20], 0x10
jb 0x18006dc7a
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [rsp + 0x2c], eax
jne 0x18006dc7a
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rsp + 0x28], eax
je 0x18006dc7a
mov rdx, qword [rdi]
test rdx, rdx
jne 0x18006dc3b
mov dword [rdi + 8], 0x80
mov r8d, 0x200
mov rcx, qword [0x18023d758]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rdi], rax
mov rdx, rax
test rax, rax
je 0x18006dca2
lea rbx, [rdi + 0xc]
jmp 0x18006dc6f
mov eax, dword [rdi + 8]
lea rbx, [rdi + 0xc]
cmp dword [rbx], eax
jb 0x18006dc6f
add eax, eax
mov r8, rdx
mov r9d, eax
xor edx, edx
mov dword [rdi + 8], eax
mov rcx, qword [0x18023d758]
shl r9, 2
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rdx, rax
test rax, rax
je 0x18006dca2
mov qword [rdi], rax
mov ecx, dword [rbx]
mov eax, dword [rsp + 0x28]
mov dword [rdx + rcx*4], eax
inc dword [rbx]
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, rbp
call sub.KERNEL32.dll_Thread32Next
test eax, eax
jne 0x18006dbe1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x18006dcbe
mov r8, qword [rdi]
xor esi, esi
test r8, r8
je 0x18006dcbe
mov rcx, qword [0x18023d758]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rdi], rsi
mov rbx, qword [rsp + 0x68]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.18006edb0
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
ret
Function at 0x18006dcf0
Capabilities:
Suspend thread

Disassembly:
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
mov ebp, r8d
mov qword [rcx], 0
mov r14d, edx
mov qword [rcx + 8], 0
mov rdi, rcx
call fcn.18006db80
test eax, eax
jne 0x18006dd37
mov eax, 9
mov rbp, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
cmp qword [rdi], 0
je 0x18006ddae
mov qword [rsp + 0x30], rbx
xor ebx, ebx
cmp dword [rdi + 0xc], ebx
jbe 0x18006dd96
mov qword [rsp + 0x38], rsi
nop
mov r8, qword [rdi]
xor edx, edx
mov r8d, dword [r8 + rbx*4]
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x18006dd8a
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SuspendThread]
mov r8d, ebp
mov edx, r14d
mov rcx, rsi
call fcn.18006e110
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebx
cmp ebx, dword [rdi + 0xc]
jb 0x18006dd50
mov rsi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
xor eax, eax
mov rbp, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
mov rbp, qword [rsp + 0x40]
xor eax, eax
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret

Function at 0x18006e2c0
Capabilities:
Resume thread

Disassembly:
push rdi
sub rsp, 0x20
cmp qword [rcx], 0
mov rdi, rcx
je 0x18006e32f
mov qword [rsp + 0x30], rbx
xor ebx, ebx
cmp dword [rcx + 0xc], ebx
jbe 0x18006e318
mov qword [rsp + 0x38], rsi
mov r8, qword [rdi]
xor edx, edx
mov r8d, dword [r8 + rbx*4]
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x18006e30c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebx
cmp ebx, dword [rdi + 0xc]
jb 0x18006e2e0
mov rsi, qword [rsp + 0x38]
mov r8, qword [rdi]
xor edx, edx
mov rcx, qword [0x18023d758]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140726058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1407261df
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 0x140726089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14072606f
add dl, dl
jne 0x140726096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1407260f6
xor eax, eax
add dl, dl
jne 0x1407260a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1407261ad
add dl, dl
jne 0x1407260b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1407260c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1407260d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1407260dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1407260ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14072607e
mov eax, 1
add dl, dl
jne 0x140726106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140726113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1407260fb
sub eax, ebx
mov ebx, 1
jne 0x14072614c
mov ecx, 1
add dl, dl
jne 0x14072612e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14072613b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140726123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14072607e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140726168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140726175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14072615d
cmp eax, 0x7d00
jae 0x14072619b
cmp eax, 0x500
jb 0x140726196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14072607e
cmp eax, 0x7f
ja 0x14072619e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14072607e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1407261d2
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 0x14072607e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001040
Capabilities:
Delete file

Disassembly:
push rbx
push rbp
push rdi
sub rsp, 0x160
mov rax, qword [0x1400933c8]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov rbp, rdx
mov rdi, rcx
lea rdx, [0x140072da8]
mov rcx, rbp
call fcn.1400078a0
mov rbx, rax
test rax, rax
je 0x140001091
mov rdx, rdi
mov rcx, rax
call fcn.1400056b0
test eax, eax
je 0x140001095
mov rcx, rbx
call fcn.140007930
xor eax, eax
jmp 0x140001102
lea r8, [rsp + 0x20]
or edx, 0xffffffff
mov rcx, rbx
call fcn.140005650
test eax, eax
jne 0x140001089
mov qword [rsp + 0x190], rsi
mov esi, dword [rsp + 0x20]
xor edi, edi
test esi, esi
jle 0x1400010e4
nop dword [rax + rax]
lea r8, [rsp + 0x20]
mov edx, edi
mov rcx, rbx
call fcn.140005650
lea r8, [rsp + 0x24]
mov edx, edi
mov rcx, rbx
call fcn.140007910
inc edi
cmp edi, esi
jl 0x1400010c0
mov rcx, rbx
call fcn.140007930
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov rsi, qword [rsp + 0x190]
mov eax, 1
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.140019560
add rsp, 0x160
pop rdi
pop rbp
pop rbx
ret

Function at 0x140001140
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r12
sub rsp, 0x20
xor ebx, ebx
mov rbp, r8
mov r12, rdx
mov rsi, rcx
test rcx, rcx
je 0x14000124d
test rdx, rdx
je 0x14000124d
test r8, r8
je 0x14000124d
call fcn.140001120
test eax, eax
jne 0x140001184
xor ecx, ecx
call fcn.14001a0fc
int3
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x48], rdi
xor eax, eax
mov rdi, rbp
mov qword [rsp + 0x50], r13
lea rdx, [0x140072db0]
repne scasb al, byte [rdi]
not rcx
lea r13, [rcx - 1]
mov rcx, rsi
call fcn.140019da8
lea rdx, [0x140072dac]
mov rcx, r12
mov rdi, rax
call fcn.140019da8
mov rcx, rdi
mov rsi, rax
call fcn.140019c00
test eax, eax
jne 0x140001225
mov edx, 1
lea rcx, [rsp + 0x40]
mov r9, rdi
mov r8, rdx
call fcn.140019be0
mov rcx, rdi
call fcn.140019c00
test eax, eax
jne 0x140001219
mov eax, ebx
mov r9, rsi
cdq
idiv r13d
movsxd rax, edx
mov edx, 1
movzx ecx, byte [rax + rbp]
mov r8, rdx
xor byte [rsp + 0x40], cl
lea rcx, [rsp + 0x40]
call fcn.140019820
inc ebx
mov rcx, rdi
call fcn.140019c00
test eax, eax
je 0x1400011d0
mov rcx, rdi
call fcn.14001960c
mov rcx, rsi
call fcn.14001960c
mov r13, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r12
pop rsi
pop rbp
ret
xor ecx, ecx
call fcn.14001a0fc
int3
Function at 0x1400018b0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edi, r8d
mov rsi, rdx
mov rbp, rcx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x1400018e3
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov rcx, rax
mov qword [rsp + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbx, rax
test rax, rax
je 0x140001927
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r11d, eax
add r11, rbx
and edi, 0xf
jbe 0x140001922
cmp rbx, r11
jae 0x140001927
add edi, 0xffffffff
movzx eax, word [rbx]
lea rbx, [rbx + rax*2 + 2]
jne 0x140001910
cmp rbx, r11
jb 0x14000192b
xor eax, eax
jmp 0x140001937
xor eax, eax
cmp word [rbx], ax
cmove rbx, rax
mov rax, rbx
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140002960
Capabilities:
Reference http user-agent string

Disassembly:
push rbx
sub rsp, 0x50
mov rax, qword [0x1400933c8]
xor rax, rsp
mov qword [rsp + 0x48], rax
cmp qword [rcx + 0x40], 0x10
mov rbx, rcx
jb 0x140002985
mov r8, qword [rcx + 0x28]
jmp 0x140002989
lea r8, [rcx + 0x28]
mov rcx, qword [rcx + 8]
mov edx, 0x2712
call fcn.140030320
lea rdx, str.Mozilla_5.0__Windows_NT_6.1__WOW64__rv:13.0__Gecko_20100101_Firefox_13.0.1
lea rcx, [rsp + 0x20]
mov r8d, Ordinal_79
mov qword [rsp + 0x40], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x38], 0
mov byte [rsp + 0x28], 0
call fcn.1400016f0
cmp qword [rsp + 0x40], 0x10
mov rcx, qword [rbx + 8]
lea r8, [rsp + 0x28]
mov edx, 0x2722
cmovae r8, qword [rsp + 0x28]
call fcn.140030320
mov rcx, qword [rbx + 8]
mov edx, 0x44
lea r8d, [rdx - 0x3f]
call fcn.140030320
mov rcx, qword [rbx + 8]
mov edx, 0x34
lea r8d, [rdx - 0x33]
call fcn.140030320
mov rcx, qword [rbx + 8]
mov edx, 0x63
lea r8d, [rdx - 0x62]
call fcn.140030320
mov rcx, qword [rbx + 8]
xor r8d, r8d
lea edx, [r8 + 0x2f]
call fcn.140030320
mov rcx, qword [rbx + 8]
lea r8, [0x1400025c0]
mov edx, 0x4e2b
call fcn.140030320
mov rcx, qword [rbx + 8]
mov r8, rbx
mov edx, 0x2711
call fcn.140030320
mov rcx, qword [rbx + 8]
xor r8d, r8d
lea edx, [r8 + 0x40]
call fcn.140030320
mov rcx, qword [rbx + 8]
xor r8d, r8d
lea edx, [r8 + 0x51]
call fcn.140030320
cmp qword [rsp + 0x40], 0x10
jb 0x140002a82
mov rcx, qword [rsp + 0x28]
call fcn.140007b18
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140019560
add rsp, 0x50
pop rbx
ret
Function at 0x140003b70
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
sub rsp, 8
mov r11d, r8d
mov r10, rdx
mov r9d, ecx
test rdx, rdx
jne 0x140003b89
xor eax, eax
add rsp, 8
ret
mov qword [rsp], rdi
not r9d
lea rdi, [0x1400746a0]
cmp r11d, 8
jb 0x140003c82
mov qword [rsp + 0x10], rbx
mov rbx, r11
shr rbx, 3
nop dword [rax]
movzx ecx, byte [r10]
mov eax, r9d
shr r9d, 8
xor rcx, rax
add r10, 8
add r11d, 0xfffffff8
movzx eax, cl
movzx ecx, byte [r10 - 7]
mov edx, dword [rdi + rax*4]
xor edx, r9d
mov eax, edx
shr edx, 8
xor rcx, rax
movzx eax, cl
movzx ecx, byte [r10 - 6]
mov r8d, dword [rdi + rax*4]
xor r8d, edx
mov eax, r8d
shr r8d, 8
xor rcx, rax
movzx eax, cl
movzx ecx, byte [r10 - 5]
mov edx, dword [rdi + rax*4]
xor edx, r8d
mov eax, edx
shr edx, 8
xor rcx, rax
movzx eax, cl
movzx ecx, byte [r10 - 4]
mov r8d, dword [rdi + rax*4]
xor r8d, edx
mov eax, r8d
shr r8d, 8
xor rcx, rax
movzx eax, cl
movzx ecx, byte [r10 - 3]
mov edx, dword [rdi + rax*4]
xor edx, r8d
mov eax, edx
shr edx, 8
xor rcx, rax
movzx eax, cl
movzx ecx, byte [r10 - 2]
mov r8d, dword [rdi + rax*4]
xor r8d, edx
mov eax, r8d
shr r8d, 8
xor rcx, rax
movzx eax, cl
movzx ecx, byte [r10 - 1]
mov edx, dword [rdi + rax*4]
xor edx, r8d
mov eax, edx
shr edx, 8
xor rcx, rax
movzx eax, cl
mov r9d, dword [rdi + rax*4]
xor r9d, edx
sub rbx, 1
jne 0x140003bb0
mov rbx, qword [rsp + 0x10]
test r11d, r11d
je 0x140003cb0
nop word [rax + rax]
movzx ecx, byte [r10]
mov eax, r9d
inc r10
xor rcx, rax
shr eax, 8
movzx edx, cl
mov r9d, dword [rdi + rdx*4]
xor r9d, eax
add r11d, 0xffffffff
jne 0x140003c90
mov rdi, qword [rsp]
not r9d
mov eax, r9d
add rsp, 8
ret

Function at 0x140003cc0
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov r9d, dword [rcx]
movsx rax, dl
mov r10, rcx
mov r8, r9
shr r9d, 8
xor r8, rax
movzx eax, r8b
lea r8, [0x1400746a0]
mov edx, dword [r8 + rax*4]
xor edx, r9d
mov dword [rcx], edx
movzx eax, dl
mov edx, dword [rcx + 8]
add eax, dword [rcx + 4]
imul eax, eax, 0x8088405
inc eax
mov dword [rcx + 4], eax
movzx eax, byte [r10 + 7]
movzx ecx, dl
xor rcx, rax
shr edx, 8
mov eax, dword [r8 + rcx*4]
xor eax, edx
mov dword [r10 + 8], eax
ret

Function at 0x140004300
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
mov rsi, r8
mov rdi, r9
mov rbp, rdx
mov r10, rcx
imul esi, edx
cmp byte [r9], 0
je 0x140004350
mov rdx, rcx
mov rcx, qword [rdi + 8]
lea r9, [rsp + 0x48]
mov r8d, esi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14000434a
mov byte [rdi + 0x10], 1
mov eax, dword [rsp + 0x48]
jmp 0x140004381
mov edx, dword [r9 + 0x2c]
mov ecx, dword [r9 + 0x28]
mov qword [rsp + 0x40], rbx
lea eax, [rdx + rsi]
cmp eax, ecx
jbe 0x140004368
sub ecx, edx
mov esi, ecx
add rdx, qword [r9 + 0x20]
mov r8d, esi
mov rcx, r10
call fcn.14001b240
add dword [rdi + 0x2c], esi
mov rbx, qword [rsp + 0x40]
mov eax, esi
mov rsi, qword [rsp + 0x58]
xor edx, edx
div rbp
mov rbp, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x140005520
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x250
mov rax, qword [0x1400933c8]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rbx, rdx
mov rdi, rcx
test rcx, rcx
je 0x140005560
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x140005560
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
movzx eax, byte [rbx]
test al, al
je 0x14000562c
mov qword [rsp + 0x270], rsi
mov rcx, rbx
mov rsi, rbx
nop dword [rax]
cmp al, 0x2f
je 0x140005588
cmp al, 0x5c
jne 0x14000558b
mov rsi, rcx
mov al, byte [rcx + 1]
inc rcx
test al, al
jne 0x140005580
cmp rsi, rbx
je 0x1400055c8
sub rsi, rbx
lea rcx, [rsp + 0x130]
mov rdx, rbx
mov r8, rsi
call fcn.14001b240
lea rdx, [rsp + 0x130]
mov rcx, rdi
mov byte [rsp + rsi + 0x130], 0
call fcn.140005520
mov rsi, qword [rsp + 0x270]
mov byte [rsp + 0x20], 0
test rdi, rdi
je 0x1400055f0
lea rcx, [rsp + 0x20]
sub rcx, rdi
movzx eax, byte [rdi]
inc rdi
mov byte [rcx + rdi - 1], al
test al, al
jne 0x1400055e2
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x20]
repne scasb al, byte [rdi]
xor ecx, ecx
nop
movzx eax, byte [rbx + rcx]
inc rcx
mov byte [rdi + rcx - 2], al
test al, al
jne 0x140005600
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x14000562c
lea rcx, [rsp + 0x20]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.140019560
mov rbx, qword [rsp + 0x278]
add rsp, 0x250
pop rdi
ret

Function at 0x140007270
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r13
sub rsp, 0x20
cmp qword [rcx], 0
mov esi, r9d
mov r13d, r8d
mov rbp, rdx
mov rbx, rcx
jne 0x14000737f
cmp dword [rcx + 8], 0xffffffff
jne 0x14000737f
lea rdx, [rcx + 0x150]
mov ecx, 0x104
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], r12
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbx + 0x150]
repne scasb al, byte [rdi]
not rcx
movzx eax, byte [rcx + rbx + 0x14e]
cmp al, 0x5c
je 0x1400072f5
cmp al, 0x2f
je 0x1400072f5
xor eax, eax
lea rdi, [rbx + 0x150]
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
movzx eax, word [0x140074c04]
mov word [rdi - 1], ax
mov r12, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x48]
cmp esi, 1
jne 0x14000732d
mov r9d, esi
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x14000732d
mov eax, 0x2000000
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r13
pop rsi
pop rbp
ret
lea r9, [rsp + 0x40]
mov r8d, esi
mov edx, r13d
mov rcx, rbp
call fcn.140004030
test rax, rax
jne 0x140007357
mov eax, dword [rsp + 0x40]
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r13
pop rsi
pop rbp
ret
mov rcx, rax
call fcn.140006bb0
xor ecx, ecx
mov edx, 0x200
test rax, rax
mov qword [rbx], rax
cmove ecx, edx
mov eax, ecx
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r13
pop rsi
pop rbp
ret
mov eax, 0x1000000
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r13
pop rsi
pop rbp
ret