joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18003a9d0
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x50
mov rax, qword [0x18008f040]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor esi, esi
mov r14d, edx
mov qword [rcx], rsi
mov rbx, rcx
mov qword [rcx + 8], rsi
xor edx, edx
mov ecx, 4
mov ebp, r8d
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x18003aafb
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Thread32First]
test eax, eax
je 0x18003aaf2
nop dword [rax + rax]
cmp dword [rsp + 0x20], 0x10
jb 0x18003aad4
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [rsp + 0x2c], eax
jne 0x18003aad4
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rsp + 0x28], eax
je 0x18003aad4
mov rdx, qword [rbx]
test rdx, rdx
jne 0x18003aa92
mov rcx, qword [0x180169b38]
mov r8d, 0x200
mov dword [rbx + 8], 0x80
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbx], rax
mov rdx, rax
test rax, rax
je 0x18003aaf2
jmp 0x18003aac7
mov eax, dword [rbx + 8]
cmp dword [rbx + 0xc], eax
jb 0x18003aac7
mov rcx, qword [0x180169b38]
lea r9d, [rax + rax]
mov r8, rdx
shl r9, 2
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rdx, rax
test rax, rax
je 0x18003aaf2
mov eax, dword [rbx + 8]
add eax, eax
mov qword [rbx], rdx
mov dword [rbx + 8], eax
mov ecx, dword [rbx + 0xc]
mov eax, dword [rsp + 0x28]
mov dword [rdx + rcx*4], eax
inc dword [rbx + 0xc]
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x18003aa40
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rbx], rsi
je 0x18003ab55
cmp dword [rbx + 0xc], esi
jbe 0x18003ab55
nop word [rax + rax]
mov r8, qword [rbx]
xor edx, edx
mov eax, esi
mov ecx, 0x5a
mov r8d, dword [r8 + rax*4]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rdi, rax
test rax, rax
je 0x18003ab4e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SuspendThread]
mov r8d, ebp
mov edx, r14d
mov rcx, rdi
call fcn.18003a820
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [rbx + 0xc]
jb 0x18003ab10
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.180070d20
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
Function at 0x18003ab80
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 [0x18008f040]
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 [0x18016a2b0]
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 0x18003abf3
mov eax, 0xa
jmp 0x18003ac86
test esi, esi
je 0x18003ac15
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 0x18003ac38
mov rax, qword [rbx]
mov word [rax], 0xf9eb
jmp 0x18003ac38
mov eax, dword [rbx + 0x18]
test byte [rbx + 0x20], 1
mov dword [rdi], eax
je 0x18003ac31
movzx eax, word [rbx + 0x1c]
mov word [rdi + 4], ax
movzx eax, byte [rbx + 0x1e]
mov byte [rdi + 6], al
jmp 0x18003ac38
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.180070d20
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
Function at 0x18003f7d0
Capabilities:
Resume thread

Disassembly:
push rbx
sub rsp, 0x20
mov rcx, qword [0x180169c18]
mov ebx, 1
add rcx, 0x2f45d70
cmp byte [0x180169aac], 0
je 0x18003f817
lea r8, [0x180169c00]
lea rdx, [fcn.18003f7a0]
call fcn.18003ae00
mov rcx, qword [0x180169c18]
mov edx, ebx
add rcx, 0x2f45d70
jmp 0x18003f819
xor edx, edx
call fcn.18003b140
mov rcx, qword [0x180169c18]
add rcx, 0x2f44de0
cmp byte [0x180169aae], 0
je 0x18003f85a
lea r8, [0x180169c10]
lea rdx, [fcn.18003f7a0]
call fcn.18003ae00
mov rcx, qword [0x180169c18]
mov edx, ebx
add rcx, 0x2f44de0
jmp 0x18003f85c
xor edx, edx
call fcn.18003b140
mov rcx, qword [0x180169c18]
add rcx, 0x2f40cc0
cmp byte [0x180169aaa], 0
je 0x18003f89d
lea r8, [0x180169b58]
lea rdx, [fcn.18003f7a0]
call fcn.18003ae00
mov rcx, qword [0x180169c18]
mov edx, ebx
add rcx, 0x2f40cc0
jmp 0x18003f89f
xor edx, edx
call fcn.18003b140
mov rcx, qword [0x180169c18]
add rcx, 0x2f3c6d0
cmp byte [0x180169aab], 0
je 0x18003f8e0
lea r8, [0x180169be8]
lea rdx, [fcn.18003f7a0]
call fcn.18003ae00
mov rcx, qword [0x180169c18]
mov edx, ebx
add rcx, 0x2f3c6d0
jmp 0x18003f8e2
xor edx, edx
call fcn.18003b140
mov rcx, qword [0x180169c18]
add rcx, 0x2f3ee50
cmp byte [0x180169aaf], 0
je 0x18003f923
lea r8, [0x180169b60]
lea rdx, [fcn.18003f7a0]
call fcn.18003ae00
mov rcx, qword [0x180169c18]
mov edx, ebx
add rcx, 0x2f3ee50
jmp 0x18003f925
xor edx, edx
call fcn.18003b140
mov rcx, qword [0x180169c18]
add rcx, 0x2f42f30
cmp byte [0x180169aa8], 0
je 0x18003f966
lea r8, [0x180169b80]
lea rdx, [fcn.18003f7a0]
call fcn.18003ae00
mov rcx, qword [0x180169c18]
mov edx, ebx
add rcx, 0x2f42f30
jmp 0x18003f968
xor edx, edx
call fcn.18003b140
mov rcx, qword [0x180169c18]
add rcx, 0x316d9e0
cmp byte [0x180169aad], 0
je 0x18003f9a9
lea r8, [0x180169c08]
lea rdx, [0x18003f7b0]
call fcn.18003ae00
mov rcx, qword [0x180169c18]
mov edx, ebx
add rcx, 0x316d9e0
jmp 0x18003f9ab
xor edx, edx
call fcn.18003b140
mov rcx, qword [0x180169c18]
add rcx, 0x3389a10
cmp byte [0x180169a4f], 0
je 0x18003f9f4
lea r8, [0x180169b78]
lea rdx, [0x18003f7c0]
call fcn.18003ae00
mov rcx, qword [0x180169c18]
mov edx, ebx
add rcx, 0x3389a10
add rsp, 0x20
pop rbx
jmp fcn.18003b140
xor ebx, ebx
mov edx, ebx
add rsp, 0x20
pop rbx
jmp fcn.18003b140
Function at 0x180042f30
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
mov rbx, rcx
cmp edx, 1
jne 0x180042f63
call qword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
xor eax, eax
lea r8, [0x180042dc0]
mov qword [rsp + 0x28], rax
mov r9, rbx
xor edx, edx
mov dword [rsp + 0x20], eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, 1
add rsp, 0x30
pop rbx
ret

Function at 0x18004a6a0
Capabilities:
Check http status code

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x110
mov rax, qword [0x18008f040]
xor rax, rsp
mov qword [rsp + 0x100], rax
mov rsi, rdx
mov rbx, rcx
lea rdx, [rsp + 0x20]
call fcn.180049b40
test rax, rax
je 0x18004a6ee
mov rdx, qword [rsp + 0x20]
mov cl, 3
sub rax, rbx
mov qword [rsi], rdx
mov byte [rsi + 8], cl
inc rax
jmp 0x18004a845
lea rdx, [0x180075020]
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_strpbrk
test rax, rax
je 0x18004a711
movzx eax, byte [rax]
or eax, 0x20
cmp eax, 0x6e
je 0x18004a843
lea rdx, [rsp + 0x20]
mov rcx, rbx
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtod
mov rcx, qword [rsp + 0x20]
lea rbp, [0x180077de0]
cmp rcx, rbx
jne 0x18004a733
xor eax, eax
jmp 0x18004a75d
movzx edx, byte [rcx]
test byte [rdx + rbp + 1], 8
je 0x18004a755
nop dword [rax]
inc rcx
mov qword [rsp + 0x20], rcx
movzx eax, byte [rcx]
test byte [rax + rbp + 1], 8
jne 0x18004a740
movzx edx, al
xor eax, eax
test dl, dl
cmove rax, rcx
test rax, rax
jne 0x18004a832
mov edx, 0x2e
mov rcx, rbx
call sub.VCRUNTIME140.dll_strchr
mov rdi, rax
test rax, rax
je 0x18004a843
mov rcx, 0xffffffffffffffff
inc rcx
cmp byte [rbx + rcx], 0
jne 0x18004a786
cmp rcx, 0xc8
ja 0x18004a843
lea rdx, [rsp + 0x30]
mov rcx, rbx
sub rdx, rbx
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x18004a7b0
call sub.api_ms_win_crt_locale_l1_1_0.dll_localeconv
sub rdi, rbx
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x30]
mov rax, qword [rax]
movzx eax, byte [rax]
mov byte [rsp + rdi + 0x30], al
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtod
mov rcx, qword [rsp + 0x20]
lea rax, [rsp + 0x30]
cmp rcx, rax
jne 0x18004a7f2
xor eax, eax
jmp 0x18004a82d
movzx edx, byte [rcx]
test byte [rdx + rbp + 1], 8
je 0x18004a815
nop dword [rax]
inc rcx
mov qword [rsp + 0x20], rcx
movzx eax, byte [rcx]
test byte [rax + rbp + 1], 8
jne 0x18004a800
movzx edx, al
xor eax, eax
test dl, dl
cmove rax, rcx
test rax, rax
je 0x18004a843
lea rcx, [rsp + 0x30]
sub rax, rcx
add rax, rbx
test rax, rax
je 0x18004a843
mov cl, 0x13
movsd qword [rsi], xmm0
sub rax, rbx
mov byte [rsi + 8], cl
inc rax
jmp 0x18004a845
xor eax, eax
mov rcx, qword [rsp + 0x100]
xor rcx, rsp
call fcn.180070d20
mov rbx, qword [rsp + 0x140]
add rsp, 0x110
pop rdi
pop rsi
pop rbp
ret
Function at 0x1800500d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp rdx, r8
je 0x1800501df
push rbx
sub rsp, 0x20
mov qword [rsp + 0x30], rdi
mov r11, r8
lea rdi, [0x180000000]
mov r10, rdx
mov rbx, rcx
movzx edx, byte [r10 + 9]
movzx eax, dl
and al, 7
cmp al, 3
jne case.0x18005013a.8
xor dl, 7
mov byte [r10 + 9], dl
test dl, 0x20
je case.0x18005013a.8
movzx eax, byte [r10 + 8]
add eax, 0xfffffffc
cmp eax, 0x22
ja case.0x18005013a.8
cdqe
movzx eax, byte [rdi + rax + 0x501f4]
mov ecx, dword [rdi + rax*4 + 0x501e0]
add rcx, rdi
jmp rcx
and dl, 0xe7
or dl, 0x20
mov byte [r10 + 9], dl
jmp case.0x18005013a.8
mov rcx, qword [r10 + 0x10]
lea rax, [r10 + 0x18]
cmp rcx, rax
je 0x18005015d
and dl, 0xc7
jmp 0x180050163
and dl, 0xe7
or dl, 0x20
mov byte [r10 + 9], dl
test byte [rcx + 8], 0x40
je case.0x18005013a.8
mov rdx, qword [rcx]
test byte [rdx + 9], 0x18
je case.0x18005013a.8
mov rcx, rbx
call fcn.180050800
jmp case.0x18005013a.8
cmp word [r10 + 0xa], 0
jne case.0x18005013a.5
mov rdx, qword [r10 + 0x18]
test rdx, rdx
je 0x18005019f
test byte [rdx + 9], 0x18
je 0x18005019f
mov rcx, rbx
call fcn.180050800
and byte [r10 + 9], 0xe7
or byte [r10 + 9], 0x20
jmp case.0x18005013a.8
mov rcx, r10
call fcn.18004f5e0
mov rcx, qword [rbx + 0x88]
mov qword [rax], rcx
mov qword [rbx + 0x88], r10
and byte [r10 + 9], 0xc7
mov r10, qword [r10]
cmp r10, r11
jne 0x1800500f3
mov rdi, qword [rsp + 0x30]
add rsp, 0x20
pop rbx
ret

Function at 0x180051c90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov eax, 1
movzx ecx, byte [rdx + 0xb]
mov rdi, rdx
shl eax, cl
mov rcx, rdx
cdqe
lea r8, [rax + rax*2]
mov rax, qword [rdx + 0x18]
lea rsi, [rax + r8*8]
call fcn.1800534b0
test eax, eax
je 0x180051cf8
xor r10d, r10d
mov r11d, eax
mov rax, qword [rdi + 0x10]
test byte [r10 + rax + 8], 0x40
je 0x180051cee
mov rdx, qword [r10 + rax]
test byte [rdx + 9], 0x18
je 0x180051cee
mov rcx, rbx
call fcn.180050800
add r10, 0x10
sub r11, 1
jne 0x180051cd0
mov r10, qword [rdi + 0x18]
cmp r10, rsi
jae 0x180051d4f
test byte [r10 + 8], 0xf
movzx eax, byte [r10 + 9]
jne 0x180051d18
test al, 0x40
je 0x180051d46
mov byte [r10 + 9], 0xb
jmp 0x180051d46
test al, 0x40
je 0x180051d2e
mov rdx, qword [r10 + 0x10]
test byte [rdx + 9], 0x18
je 0x180051d2e
mov rcx, rbx
call fcn.180050800
test byte [r10 + 8], 0x40
je 0x180051d46
mov rdx, qword [r10]
test byte [rdx + 9], 0x18
je 0x180051d46
mov rcx, rbx
call fcn.180050800
add r10, 0x18
cmp r10, rsi
jb 0x180051d01
movzx eax, byte [rdi + 9]
movzx ecx, al
and cl, 7
cmp cl, 5
jne 0x180051d8b
mov rcx, rdi
call fcn.18004f5e0
mov rcx, qword [rbx + 0x90]
mov qword [rax], rcx
mov qword [rbx + 0x90], rdi
and byte [rdi + 9], 0xc7
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
cmp cl, 6
jne 0x180051d95
xor al, 2
mov byte [rdi + 9], al
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x180052280
Capabilities:
Encode data using xor

Disassembly:
mov eax, edx
mov r10, rcx
xor eax, r8d
test rdx, rdx
je 0x1800522b1
nop dword [rax]
movzx r9d, byte [r10 + rdx - 1]
mov r8d, eax
shl r8d, 5
mov ecx, eax
add r9d, r8d
shr ecx, 2
add r9d, ecx
xor eax, r9d
sub rdx, 1
jne 0x180052290
ret

Function at 0x180052520
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbp
push rsi
sub rsp, 0x20
mov rsi, r8
mov rbp, rdx
cmp r8, 0x28
ja 0x180052545
mov rbp, qword [rsp + 0x40]
add rsp, 0x20
pop rsi
jmp fcn.180051fb0
movabs rax, 0x7fffffffffffffdf
cmp rsi, rax
jae 0x1800525ad
mov rax, qword [rcx + 0x18]
add r8, 0x19
mov qword [rsp + 0x30], rbx
mov edx, 0x14
mov qword [rsp + 0x38], rdi
mov ebx, dword [rax + 0x60]
call fcn.18004fa50
mov r8, rsi
mov rdx, rbp
mov rdi, rax
mov dword [rax + 0xc], ebx
lea rcx, [rax + 0x18]
mov byte [rax + 0xa], 0
mov byte [rax + rsi + 0x18], 0
mov qword [rax + 0x10], rsi
call sub.VCRUNTIME140.dll_memcpy
mov rbx, qword [rsp + 0x30]
mov rax, rdi
mov rdi, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
add rsp, 0x20
pop rsi
ret
call fcn.18005a1d0
int3
Function at 0x18005f380
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x450
mov rax, qword [0x18008f040]
xor rax, rsp
mov qword [rsp + 0x440], rax
mov r13d, r8d
mov rbp, rdx
mov rbx, rcx
call fcn.180045100
mov rcx, rbp
mov r15d, eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_clearerr
mov rcx, rbx
sub r15d, 1
jne 0x18005f3fc
mov r8d, 1
mov rdx, rbp
call fcn.18005fbb0
mov esi, eax
lea r14d, [r13 + 1]
mov rcx, rbp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
test eax, eax
je 0x18005f585
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.180047160
jmp 0x18005f5a4
lea edx, [r15 + 0x14]
lea r8, str.too_many_arguments
call fcn.180046e30
mov esi, 1
mov r14d, r13d
dec r15d
test esi, esi
je 0x18005f3da
mov edx, r14d
mov rcx, rbx
call fcn.180046220
mov edx, r14d
mov rcx, rbx
cmp eax, 3
jne 0x18005f4c0
call fcn.180046c10
mov rdi, rax
test rax, rax
jne 0x18005f473
mov rcx, rbp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
mov rdx, rbp
mov ecx, eax
mov edi, eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ungetc
lea rdx, [0x1800784d0]
mov rcx, rbx
call fcn.180045750
xor esi, esi
cmp edi, 0xffffffff
setne sil
jmp 0x18005f563
lea rdx, [rsp + 0x20]
mov rcx, rbx
call fcn.180046b60
mov rdx, rdi
lea rcx, [rsp + 0x20]
call fcn.180047ab0
mov r9, rbp
mov r8, rdi
mov edx, 1
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add qword [rsp + 0x30], rax
lea rcx, [rsp + 0x20]
mov rdi, rax
call fcn.180047ac0
xor esi, esi
test rdi, rdi
setne sil
jmp 0x18005f563
xor r8d, r8d
call fcn.180046ca0
movzx ecx, byte [rax]
cmp cl, 0x2a
jne 0x18005f4d4
movzx ecx, byte [rax + 1]
cmp cl, 0x4c
je 0x18005f553
cmp cl, 0x61
je 0x18005f501
cmp cl, 0x6c
je 0x18005f4f9
cmp cl, 0x6e
mov rcx, rbx
jne 0x18005f574
mov rdx, rbp
call fcn.18005fce0
jmp 0x18005f561
mov r8d, 1
jmp 0x18005f556
lea rdx, [rsp + 0x20]
mov rcx, rbx
call fcn.180046b60
nop
mov edx, 0x400
lea rcx, [rsp + 0x20]
call fcn.180047ab0
mov r9, rbp
mov edx, 1
mov r8d, 0x400
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add qword [rsp + 0x30], rax
cmp rax, 0x400
je 0x18005f510
lea rcx, [rsp + 0x20]
call fcn.180047ac0
mov esi, 1
jmp 0x18005f563
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
call fcn.18005fbb0
mov esi, eax
inc r14d
test r15d, r15d
jne 0x18005f414
jmp 0x18005f3da
lea r8, str.invalid_format
mov edx, r14d
call fcn.180046a50
jmp 0x18005f5a4
test esi, esi
jne 0x18005f59e
mov edx, 0xfffffffe
mov rcx, rbx
call fcn.180045d90
mov rcx, rbx
call fcn.180045720
sub r14d, r13d
mov eax, r14d
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.180070d20
add rsp, 0x450
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x1800685e0
Capabilities:
Query environment variable

Disassembly:
mov r11, rsp
push rsi
push r15
sub rsp, 0x478
mov rax, qword [0x18008f040]
xor rax, rsp
mov qword [rsp + 0x440], rax
mov qword [r11 - 0x18], rbx
mov r15, rdx
mov qword [r11 - 0x20], rbp
lea rdx, str._s_s
mov qword [r11 - 0x28], rdi
mov rbx, r8
mov qword [r11 - 0x30], r14
mov rsi, rcx
mov r14, r9
lea r9, str._5_4
call fcn.180045630
mov rcx, rax
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
mov rdi, rax
test rax, rax
jne 0x180068652
mov rcx, rbx
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
mov rdi, rax
test rax, rax
je 0x180068777
lea r8, str.LUA_NOENV
mov edx, 0xfff0b9d8
mov rcx, rsi
call fcn.180044e90
mov edx, 0xffffffff
mov rcx, rsi
call fcn.180045f50
mov edx, 0xfffffffe
mov rcx, rsi
mov ebx, eax
call fcn.180045d90
test ebx, ebx
jne 0x180068777
lea rdx, [0x180077ba4]
mov rcx, rdi
call sub.VCRUNTIME140.dll_strstr
mov rbp, rax
test rax, rax
jne 0x1800686a9
mov rdx, rdi
jmp 0x18006877a
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rdi + rbx], 0
jne 0x1800686b0
lea rdx, [rsp + 0x20]
mov rcx, rsi
call fcn.180046b60
cmp rdi, rbp
jae 0x18006870c
mov r8, rbp
lea rcx, [rsp + 0x20]
sub r8, rdi
mov rdx, rdi
call fcn.180046920
mov rcx, qword [rsp + 0x30]
cmp rcx, qword [rsp + 0x28]
jb 0x1800686fe
mov edx, 1
lea rcx, [rsp + 0x20]
call fcn.180047ab0
mov rcx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x20]
mov byte [rax + rcx], 0x3b
inc qword [rsp + 0x30]
mov rdx, r14
lea rcx, [rsp + 0x20]
call fcn.180046970
lea rax, [rdi - 2]
add rax, rbx
cmp rbp, rax
jae 0x18006876b
mov rcx, qword [rsp + 0x30]
cmp rcx, qword [rsp + 0x28]
jb 0x180068745
mov edx, 1
lea rcx, [rsp + 0x20]
call fcn.180047ab0
mov rcx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x20]
lea rdx, [rbp + 2]
sub rbx, rbp
mov byte [rax + rcx], 0x3b
lea rcx, [rsp + 0x20]
inc qword [rsp + 0x30]
lea r8, [rbx - 2]
add r8, rdi
call fcn.180046920
lea rcx, [rsp + 0x20]
call fcn.180047ac0
jmp 0x180068782
mov rdx, r14
mov rcx, rsi
call fcn.180045750
mov r8d, 0x105
lea rdx, [rsp + 0x20]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov r14, qword [rsp + 0x458]
mov rdi, qword [rsp + 0x460]
mov rbp, qword [rsp + 0x468]
mov rbx, qword [rsp + 0x470]
test eax, eax
je 0x180068820
cmp eax, 0x105
je 0x180068820
mov edx, 0x5c
lea rcx, [rsp + 0x20]
call sub.VCRUNTIME140.dll_strrchr
test rax, rax
je 0x180068820
xor r8d, r8d
mov byte [rax], 0
mov edx, 0xffffffff
mov rcx, rsi
call fcn.180046030
mov rdx, rax
lea r9, [rsp + 0x20]
lea r8, [0x180077b68]
mov rcx, rsi
call fcn.180047310
mov edx, 0xfffffffe
mov r8d, 0xffffffff
mov rcx, rsi
call fcn.180045a50
mov edx, 0xfffffffe
mov rcx, rsi
call fcn.180045d90
jmp 0x18006882f
lea rdx, str.unable_to_get_ModuleFileName
mov rcx, rsi
call fcn.180047010
mov r8, r15
mov edx, 0xfffffffd
mov rcx, rsi
call fcn.180045b40
mov edx, 0xfffffffe
mov rcx, rsi
call fcn.180045d90
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.180070d20
add rsp, 0x478
pop r15
pop rsi
ret
Function at 0x1400040e4
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je 0x140004114
call qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
jmp 0x14000418c
mov rax, qword [rcx + 0x40]
mov rsi, rbx
mov r9, qword [rax]
test r9, r9
je 0x14000412b
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x14000412d
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140004186
test ecx, ecx
jle 0x140004166
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x140004186
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140004186
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
sub rsi, rbx
mov rax, rsi
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret

Function at 0x1400041a8
Capabilities:
Read file on windows

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, 0x20
mov rdi, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x1400041d6
xor eax, eax
jmp 0x1400042bf
cmp qword [rcx + 0x68], 0
je 0x1400041e8
call qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
jmp 0x1400042bf
mov rax, qword [rcx + 0x38]
mov rbp, rdi
mov rdx, qword [rax]
test rdx, rdx
je 0x1400041ff
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140004201
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140004233
cmp rax, rdi
mov rbx, rdi
mov rcx, r14
cmovb rbx, rax
mov r8, rbx
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rbx
sub rbp, rbx
sub dword [rax], ebx
mov rcx, qword [rsi + 0x38]
movsxd rax, ebx
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x1400042b9
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14000426a
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
mov ebx, 0xfff
jmp 0x140004294
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbp, rax
cmp rax, rbx
jne 0x1400042b9
cmp rbp, rbx
ja 0x140004271
test rbp, rbp
je 0x1400042b9
mov r9, qword [rsi + 0x80]
mov r8, rbp
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbp, rax
sub rdi, rbp
mov rax, rdi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret