joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180002070
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov r12d, edx
mov r15, rcx
xor edx, edx
lea rcx, str.kernel32.dll
call qword [sym.imp.ole32.dll_CoLoadLibrary]
mov rbp, rax
xor esi, esi
mov ebx, esi
movsxd r8, dword [rax + 0x3c]
mov r9d, dword [r8 + rax + 0x88]
add r9, rax
mov edi, dword [r9 + 0x20]
mov r13d, dword [r9 + 0x1c]
add rdi, rax
mov r14d, dword [r9 + 0x18]
add r13, rax
mov eax, dword [r9 + 0x24]
add rax, rbp
mov qword [rsp + 0x60], rax
test r14d, r14d
je 0x180002100
nop word [rax + rax]
mov ecx, dword [rdi]
lea rdx, str.VirtualAlloc
add rcx, rbp
call fcn.180041b40
test eax, eax
je 0x180002145
inc ebx
add rdi, 4
cmp ebx, r14d
jb 0x1800020e0
mov r14, rsi
lea rcx, [0x180087a2c]
call fcn.1800141e8
lea rcx, str.8192
mov edi, eax
call fcn.1800141e8
lea rcx, str.4096
mov ebx, eax
call fcn.1800141e8
or ebx, eax
mov rdx, r12
mov r8d, ebx
mov r9d, edi
xor ecx, ecx
call r14
mov r9, rax
test rax, rax
jne 0x18000215a
jmp 0x1800021a8
mov rcx, qword [rsp + 0x60]
mov eax, ebx
movzx ecx, word [rcx + rax*2]
mov r14d, dword [r13 + rcx*4]
add r14, rbp
jmp 0x180002103
test r12d, r12d
je 0x1800021a5
mov r8, r9
lea r10, str.q6CtkYocveYAq_h1___HFF_V8gUnf7cx6_lKU_E_i4Dr_d0GoBK3_
sub r15, r9
nop dword [rax]
mov eax, 0x1f7047dd
lea r8, [r8 + 1]
mul esi
mov eax, esi
mov ecx, esi
sub eax, edx
inc esi
shr eax, 1
add eax, edx
shr eax, 5
imul eax, eax, 0x39
sub ecx, eax
movsxd rax, ecx
movzx eax, byte [rax + r10]
xor al, byte [r15 + r8 - 1]
mov byte [r8 - 1], al
cmp esi, r12d
jb 0x180002170
mov rax, r9
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x180003f70
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rsi, qword [0x1800908a8]
xor ebp, ebp
mov ebx, ebp
movsxd rax, dword [rsi + 0x3c]
mov ecx, dword [rax + rsi + 0x88]
add rcx, rsi
mov edi, dword [rcx + 0x20]
mov r15d, dword [rcx + 0x1c]
add rdi, rsi
mov r12d, dword [rcx + 0x24]
add r15, rsi
mov r14d, dword [rcx + 0x18]
add r12, rsi
test r14d, r14d
je 0x180003ff4
mov ecx, dword [rdi]
lea rdx, [0x180087a90]
add rcx, rsi
call fcn.180041b40
test eax, eax
je 0x180003fe6
inc ebx
add rdi, 4
cmp ebx, r14d
jb 0x180003fc4
jmp 0x180003ff4
mov eax, ebx
movzx ecx, word [r12 + rax*2]
mov ebp, dword [r15 + rcx*4]
add rbp, rsi
call rbp
mov rbx, qword [rsp + 0x40]
xor eax, eax
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x1400182d0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x50
mov rdi, rdx
mov rbx, rcx
cmp qword [rcx + 0x18], 8
jb 0x1400182ea
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400183ac
bt eax, 0xa
jae 0x1400183ac
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x140018310
mov rdx, qword [rbx]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x140018320
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
lea rcx, [rsp + 0x20]
call fcn.14000b2e0
nop
lea rcx, [rsp + 0x20]
cmp qword [rsp + 0x38], 8
cmovae rcx, qword [rsp + 0x20]
call fcn.14002f1a0
shr rax, 0x20
test eax, eax
jne 0x1400183e8
mov rdx, qword [rsp + 0x38]
cmp rdx, 8
jb 0x1400183ac
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400183a7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400183f5
call fcn.140056410
cmp qword [rbx + 0x18], 8
jb 0x1400183b6
mov rbx, qword [rbx]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x1400183d7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1400183d7
xor al, al
jmp 0x1400183dd
mov al, 1
jmp 0x1400183dd
mov rbx, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
lea r8, [rsp + 0x20]
mov edx, eax
call fcn.1400179c0
nop
call fcn.14006a8a0
int3
Function at 0x14001c9b0
Capabilities:
Get session information
Get session user name
Print debug messages

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x60
mov rax, qword [0x1400cd200]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rdi, rcx
mov qword [rsp + 0x38], rcx
xor ebp, ebp
mov dword [rsp + 0x30], ebp
xorps xmm0, xmm0
movups xmmword [rcx], xmm0
mov qword [rcx + 0x10], rbp
mov qword [rcx + 0x18], rbp
lea r8d, [rbp + 7]
lea rdx, str.UNKNOWN
call fcn.14000b2e0
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x40], rbp
mov dword [rsp + 0x48], ebp
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
cmp eax, 0xffffffff
jne 0x14001ca27
lea rcx, str.Error_retrieving_session_id_for_generating_log_name.
jmp 0x14001cadb
lea rcx, [rsp + 0x48]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x40]
mov r8d, 5
mov edx, eax
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x14001cad4
mov r9, qword [rsp + 0x40]
test r9, r9
je 0x14001cad4
mov eax, dword [rsp + 0x48]
cmp eax, 2
jbe 0x14001caba
mov edx, eax
shr rdx, 1
dec rdx
mov rax, qword [rdi + 0x18]
cmp rdx, rax
ja 0x14001caa5
mov rsi, rdi
cmp rax, 8
jb 0x14001ca7e
mov rsi, qword [rdi]
mov qword [rdi + 0x10], rdx
lea rbx, [rdx + rdx]
mov r8, rbx
mov rdx, r9
mov rcx, rsi
call fcn.1400589a0
mov word [rbx + rsi], bp
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
jmp 0x14001cae1
mov rcx, rdi
call fcn.140014130
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
jmp 0x14001cae1
lea rcx, str.WTSQuerySessionInformation_failed_to_retrieve_the_size_of_the_current_user_name_for_the_log_name.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
jmp 0x14001cae1
lea rcx, str.WTSQuerySessionInformation_failed_to_retrieve_current_user_name_for_the_log_name.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rax, rdi
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400563a0
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
Function at 0x140024860
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x180]
sub rsp, 0x280
mov rax, qword [0x1400cd200]
xor rax, rsp
mov qword [rbp + 0x170], rax
mov rdi, rcx
mov qword [rsp + 0x20], rcx
xor esi, esi
mov qword [rbp + 0x158], rsi
lea rax, [rsp + 0x58]
mov qword [rbp + 0x160], rax
mov dword [rbp + 0x168], 0x200
mov edx, 0x100
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ecx, eax
test eax, eax
je 0x14002493e
nop dword [rax]
mov edx, dword [rbp + 0x168]
mov eax, edx
shr eax, 1
mov r8d, ecx
cmp ecx, eax
jb 0x1400249a0
lea rbx, [r8 + r8]
cmp rbx, rdx
jbe 0x140024926
mov rcx, rbx
call fcn.1400563c0
mov rcx, qword [rbp + 0x158]
mov qword [rbp + 0x158], rax
test rcx, rcx
je 0x140024915
call fcn.140056400
mov rax, qword [rbp + 0x158]
mov edx, ebx
mov dword [rbp + 0x168], ebx
mov qword [rbp + 0x160], rax
jmp 0x14002492d
mov rax, qword [rbp + 0x160]
shr edx, 1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ecx, eax
test eax, eax
jne 0x1400248d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea rax, [0x1400d82b0]
mov qword [rsp + 0x28], rax
mov byte [rdi + 0x20], 0
movups xmm0, xmmword [rsp + 0x20]
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], rsi
mov rcx, qword [rbp + 0x158]
test rcx, rcx
je 0x140024975
call fcn.140056400
mov rax, rdi
mov rcx, qword [rbp + 0x170]
xor rcx, rsp
call fcn.1400563a0
lea r11, [rsp + 0x280]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], rsi
mov rdx, qword [rbp + 0x160]
lea rcx, [rsp + 0x38]
call fcn.14000b2e0
mov byte [rdi + 0x20], 1
movups xmm0, xmmword [rsp + 0x38]
movups xmmword [rdi], xmm0
movups xmm1, xmmword [rsp + 0x48]
movups xmmword [rdi + 0x10], xmm1
jmp 0x140024964
Function at 0x140028f10
Capabilities:
Get windows directory from kuser_shared_data

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push rbp
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x1400cd200]
xor rax, rsp
mov qword [rbp - 8], rax
xor ebx, ebx
mov dword [rbp - 0x38], ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea rdx, [rbp - 0x38]
call qword [sym.imp.KERNEL32.dll_IsWow64Process]
lea rdi, [0x1400d82b0]
test eax, eax
je 0x1400290f8
cmp dword [rbp - 0x38], ebx
mov cl, 1
mov r8, qword [rbp - 0x18]
setne al
mov byte [rbp - 0x28], al
mov byte [rbp - 0x10], cl
movzx ecx, cl
test ecx, ecx
jne 0x140028f8a
test r8, r8
je 0x140028f8a
mov rax, qword [r8]
lea edx, [rcx + 1]
mov rcx, r8
mov rax, qword [rax]
call qword [0x1400a6530]
mov word [rbp - 0x40], bx
mov word [rbp - 0x38], bx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp - 0x38]
lea rdx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_IsWow64Process2]
test eax, eax
je 0x1400290d8
jmp 0x140029065
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x2000000
mov edx, 0x100080
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 7]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140029014
lea rdi, [0x1400cffd0]
xor r9d, r9d
mov rdx, rdi
mov r8d, 0x100
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFinalPathNameByHandleW]
test eax, eax
jne 0x140029037
test rbx, rbx
je 0x140029014
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1400563a0
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop rbp
ret
cmp eax, 0x100
jae 0x140029006
mov eax, eax
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x38], rdi
movups xmm0, xmmword [rbp - 0x38]
movaps xmmword [0x1400d01d0], xmm0
test rbx, rbx
je 0x140029061
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x140029016
movzx r8d, word [rbp - 0x38]
movzx ecx, word [rbp - 0x40]
mov eax, r8d
test cx, cx
mov dword [rbp - 0x34], r8d
mov r8, qword [rbp - 0x18]
cmovne eax, ecx
mov cl, 1
mov dword [rbp - 0x38], eax
mov rax, qword [rbp - 0x38]
mov qword [rbp - 0x28], rax
mov byte [rbp - 0x10], cl
movzx ecx, cl
test ecx, ecx
jne 0x1400290ad
test r8, r8
je 0x1400290ad
mov rax, qword [r8]
lea edx, [rcx + 1]
mov rcx, r8
mov rax, qword [rax]
call qword [0x1400a6530]
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
mov rax, qword [rcx + 0x90]
lea rcx, [rax + 0x1e]
test rax, rax
jne 0x140028fb6
mov ecx, 0x7ffe0030
jmp 0x140028fb6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rbp - 0x30], rdi
xor cl, cl
mov dword [rbp - 0x38], eax
mov r8, rbx
movups xmm0, xmmword [rbp - 0x38]
mov qword [rbp - 0x18], rbx
movups xmmword [rbp - 0x28], xmm0
jmp 0x14002908c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rbp - 0x30], rdi
xor cl, cl
mov dword [rbp - 0x38], eax
mov r8, rbx
movups xmm0, xmmword [rbp - 0x38]
mov qword [rbp - 0x18], rbx
movups xmmword [rbp - 0x28], xmm0
jmp 0x140028f69
Function at 0x14002d380
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
movsxd r8, dword [0x14000003c]
lea rsi, [0x140000000]
add r8, rsi
mov rbx, rdx
mov rdi, rcx
cmp dword [r8 + 0x84], 0xd
jbe 0x14002d3f8
mov r10d, dword [r8 + 0xf0]
xor r9d, r9d
test r10d, r10d
je 0x14002d3f8
movzx ecx, word [r8 + 0x14]
movzx r11d, word [r8 + 6]
add rcx, 0x18
mov r10d, dword [r10 + rsi + 0xc]
add rcx, r8
test r11d, r11d
je 0x14002d3f8
mov eax, dword [rcx + 0xc]
cmp r10d, eax
jb 0x14002d3ec
mov edx, dword [rcx + 8]
add eax, edx
cmp r10d, eax
jb 0x14002d40a
inc r9d
add rcx, 0x28
cmp r9d, r11d
jb 0x14002d3da
xor eax, eax
mov rbx, qword [rsp + 8]
mov rsi, qword [rsp + 0x10]
mov rdi, qword [rsp + 0x18]
ret
mov dword [rdi], edx
mov eax, dword [rcx + 0x24]
mov dword [rbx], eax
mov eax, dword [rcx + 0xc]
add rax, rsi
jmp 0x14002d3fa

Function at 0x14002ef40
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rdi, rdx
lea r8, [rsp + 0x60]
mov ebx, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
mov r8d, ebx
mov ecx, 0x1300
neg eax
sbb r9d, r9d
and qword [rsp + 0x30], 0
and r9d, dword [rsp + 0x60]
xor edx, edx
and dword [rsp + 0x28], 0
mov dword [rsp + 0x60], r9d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x14002efc4
mov r8, qword [rdi]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x1400ab800]
cmp byte [rcx + rax], 0
je 0x14002efc4
dec r8
sub rdx, 1
jne 0x14002efaa
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x1400573b0
Capabilities:
Parse pe header

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
xor edi, edi
mov esi, edx
mov rbp, rcx
test r8, r8
jne 0x14006aabf
call fcn.14006b800
mov dword [rax], 0x16
call fcn.14006a880
xor eax, eax
jmp 0x14006ab4d
mov rdx, r9
mov rcx, r8
call fcn.14006aa24
mov rbx, rax
test rax, rax
je 0x14006ab4a
lea rax, [rsp + 0x50]
mov rdx, rsi
mov qword [rsp + 0x28], rax
lea r8, [0x14006a950]
mov eax, dword [rsp + 0x60]
mov r9, rbx
mov rcx, rbp
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rdx, rax
test rax, rax
jne 0x14006ab37
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14006b770
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x14006ab1e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x14006ab2d
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, rbx
call fcn.14007a814
jmp 0x14006ab4a
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x14006ab47
mov eax, dword [rsp + 0x50]
mov dword [rcx], eax
mov rdi, rdx
mov rax, rdi
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret

Function at 0x140077bfc
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x1400779f8

Function at 0x14007f964
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14007f97a
mov al, 1
jmp 0x14007f9da
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14007f98b
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14007f9d8
mov ecx, dword [rcx + 0x18]
nop
call fcn.140085028
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14007f9d8
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14007f9d8
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14007f9d8
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14007f9da
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x140081440
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.140056d80
sub rsp, rax
mov rax, qword [0x1400cd200]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14007bbe4
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x14008148f
mov rax, rbp
jmp 0x140081597
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0xd35b0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.14008107c
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0xd35b0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140081593
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140081593
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.14008107c
test rax, rax
js 0x140081593
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140081593
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140081585
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140081585
cmp byte [rcx], 0xd
jne 0x14008156b
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x14008157a
cmp byte [rcx + 1], 0xa
jne 0x14008157a
inc rcx
jmp 0x14008157a
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0xcdd10]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x14008154d
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x140081597
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.1400563a0
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140084408
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 0x14008448f
mov rsi, rbx
cmp word [rax], bp
je 0x14008444e
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140084438
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140084434
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14007a850
mov rdi, rax
test rax, rax
je 0x14008447c
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.1400589a0
mov rbp, rdi
xor ecx, ecx
call fcn.14007a814
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 0x1400875b8
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.14007c0f0
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x140087659
cmp ebx, dword [rsp + 0x30]
je 0x140087652
test esi, esi
je 0x140087652
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x14008762d
sub r8w, 0x61
cmp r8w, 0x19
ja 0x14008763a
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x140087617
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x14008763e
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x14008765b
mov eax, 1
jmp 0x14008765b
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14008949c
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1400d35b0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x1400894f3
cmp word [rdx], r13w
jne 0x1400894f3
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1400894f8
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x14008961d
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14008963e
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140089531
mov rdx, r9
mov word [rbx], cx
jmp 0x140089558
cmp r9, r8
jae 0x140089568
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x140089512
jmp 0x14008961d
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140089612
cmp dword [rsp + 0x80], esi
je 0x140089612
lea r8, [0x1400d35b0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1400895ea
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1400895ba
mov word [rbx], r13w
jmp 0x14008961a
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x1400895c7
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14008961a
cmp word [rsp + 0x70], r13w
jne 0x1400895f7
cmp rbx, r14
je 0x1400895b4
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140081084
cmp word [rsp + 0x70], r13w
je 0x14008961d
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1400d35b0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x140089617
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x14008961d
Function at 0x14008c778
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.140081084
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140081084
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14008c8c8
cmp rax, 0xffffffffffffffff
je 0x14008c8c8
xor edi, edi
test rbp, rbp
jle 0x14008c873
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14007a79c
mov rbx, rax
test rax, rax
jne 0x14008c800
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14008c869
mov edx, 0x8000
mov ecx, r14d
call fcn.140078a74
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.140080b0c
cmp eax, 0xffffffff
je 0x14008c849
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14008c810
mov edx, r15d
mov ecx, r14d
call fcn.140078a74
jmp 0x14008c869
cmp byte [rsi + 0x38], dil
je 0x14008c860
cmp dword [rsi + 0x34], 5
jne 0x14008c860
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14008c869
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14007a814
jmp 0x14008c8dc
jns 0x14008c8dc
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140081084
cmp rax, 0xffffffffffffffff
jne 0x14008c894
cmp byte [rsi + 0x30], dil
je 0x14008c8dc
mov edi, dword [rsi + 0x2c]
jmp 0x14008c8dc
mov ecx, r14d
call fcn.140085028
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14008c8dc
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 0x14008c8dc
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14008c8d5
mov eax, dword [rsi + 0x2c]
jmp 0x14008c8da
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140081084
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