joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140048b9c
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.14003cfe4
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 0x140048c3d
cmp ebx, dword [rsp + 0x30]
je 0x140048c36
test esi, esi
je 0x140048c36
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x140048c11
sub r8w, 0x61
cmp r8w, 0x19
ja 0x140048c1e
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x140048bfb
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x140048c22
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x140048c3f
mov eax, 1
jmp 0x140048c3f
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x14004d354
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.1400428f0
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1400428f0
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14004d4a4
cmp rax, 0xffffffffffffffff
je 0x14004d4a4
xor edi, edi
test rbp, rbp
jle 0x14004d44f
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14003d5b8
mov rbx, rax
test rax, rax
jne 0x14004d3dc
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14004d445
mov edx, 0x8000
mov ecx, r14d
call fcn.140039f04
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.14003e110
cmp eax, 0xffffffff
je 0x14004d425
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14004d3ec
mov edx, r15d
mov ecx, r14d
call fcn.140039f04
jmp 0x14004d445
cmp byte [rsi + 0x38], dil
je 0x14004d43c
cmp dword [rsi + 0x34], 5
jne 0x14004d43c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14004d445
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14003e418
jmp 0x14004d4b8
jns 0x14004d4b8
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1400428f0
cmp rax, 0xffffffffffffffff
jne 0x14004d470
cmp byte [rsi + 0x30], dil
je 0x14004d4b8
mov edi, dword [rsi + 0x2c]
jmp 0x14004d4b8
mov ecx, r14d
call fcn.140046648
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14004d4b8
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 0x14004d4b8
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14004d4b1
mov eax, dword [rsi + 0x2c]
jmp 0x14004d4b6
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1400428f0
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x401d90
Capabilities:
Query environment variable

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r8d, 0x100
lea rdx, [0x0040ca60]
mov r13, rcx
call rsi
mov ebx, eax
cmp eax, 0xff
ja 0x401de0
test eax, eax
lea r12, [0x0040ca60]
mov eax, 0
cmove r12, rax
mov rax, r12
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
ret
lea ecx, [rax + 1]
add rcx, rcx
call sub.msvcrt.dll_malloc
mov r12, rax
test rax, rax
je 0x401e0c
mov r8d, ebx
mov rdx, rax
mov rcx, r13
call rsi
mov rax, r12
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
ret
lea rdx, str.Could_not_allocate_environment_buffer
mov ecx, 0x68
call fcn.00401ca0
nop
nop
Function at 0x401eb0
Capabilities:
Create process on windows

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x188
mov rdx, rcx
mov rsi, rcx
lea r13, [rsp + 0x5c]
lea rcx, str.run_child:_about_to_run__ls_n
lea rbx, [rsp + 0xf0]
call fcn.004015a0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateJobObjectW]
mov qword [rsp + 0x20], r13
mov r9d, 0x90
mov r8, rbx
mov r12, rax
mov edx, 9
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_QueryInformationJobObject]
test eax, eax
je 0x401f1a
cmp dword [rsp + 0x5c], 0x90
jne 0x401f1a
test r12, r12
jne 0x401f2b
lea rdx, str.Job_information_querying_failed
mov ecx, 0x65
call fcn.00401ca0
mov r9d, 0x90
mov r8, rbx
mov edx, 9
mov rcx, r12
or dword [rsp + 0x100], 0x3000
call qword [sym.imp.KERNEL32.dll_SetInformationJobObject]
test eax, eax
jne 0x401f62
lea rdx, str.Job_information_setting_failed
mov ecx, 0x65
call fcn.00401ca0
lea rbp, [rsp + 0x80]
xor eax, eax
mov ecx, 0x1a
mov rdi, rbp
rep stosd dword [rdi], eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov ecx, 0xfffffff6
mov rbx, qword [sym.imp.KERNEL32.dll_GetStdHandle]
call rbx
lea rdx, [rsp + 0xd0]
mov rcx, rax
call fcn.00401e20
test eax, eax
je 0x401fcd
mov ecx, 0xfffffff5
call rbx
lea rdx, [rsp + 0xd8]
mov rcx, rax
call fcn.00401e20
test eax, eax
jne 0x401fde
lea rdx, str.stdout_duplication_failed
mov ecx, 0x64
call fcn.00401ca0
lea rdx, str.stdin_duplication_failed
mov ecx, 0x64
call fcn.00401ca0
mov ecx, 0xfffffff4
call rbx
lea rdx, [rsp + 0xe0]
mov rcx, rax
call fcn.00401e20
test eax, eax
jne 0x40200a
lea rdx, str.stderr_duplication_failed
mov ecx, 0x64
call fcn.00401ca0
mov edx, 1
lea rcx, [0x00401590]
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test eax, eax
jne 0x402031
lea rdx, str.control_handler_setting_failed
mov ecx, 0x65
call fcn.00401ca0
lea rax, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov dword [rsp + 0xbc], 0x100
mov rdx, rsi
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x402096
mov r8, rsi
lea rdx, str.Unable_to_create_process_using__ls
mov ecx, 0x65
call fcn.00401ca0
mov rdx, qword [rsp + 0x60]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or edx, 0xffffffff
mov rcx, qword [rsp + 0x60]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
mov rcx, qword [rsp + 0x60]
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x4020e3
lea rdx, str.Failed_to_get_exit_code_of_process
mov ecx, 0x65
call fcn.00401ca0
mov edx, dword [rsp + 0x5c]
lea rcx, str.child_process_exit_code:__d_n
call fcn.004015a0
mov ecx, dword [rsp + 0x5c]
call sub.msvcrt.dll_exit
nop
nop dword [rax]
Function at 0x402350
Capabilities:
Read .ini file

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x30
lea r13, str.pythonX
lea r9, str.py__ls
mov r8, 0xffffffffffffffff
mov edx, 0x400
lea rcx, [0x0040c040]
mov qword [rsp + 0x20], r13
call qword [sym.imp.msvcrt.dll__snwprintf_s]
lea rcx, [0x0040c040]
call fcn.00401d90
lea r9, str.environment
mov r12, rax
test rax, rax
je 0x4023c8
mov r8, r12
lea rdx, str.pythonX
lea rcx, str.found_configured_value__ls_ls_in__ls_n
call fcn.004015a0
mov rax, r12
add rsp, 0x30
pop rbx
pop r12
pop r13
ret
cmp word [0x0044c600], 0
lea rbx, [0x0044c600]
jne 0x402450
cmp word [0x0044c3e0], 0
lea rbx, [0x0044c3e0]
je 0x402430
xor r8d, r8d
mov qword [rsp + 0x28], rbx
lea r9, [0x0040c040]
lea rdx, str.pythonX
mov dword [rsp + 0x20], 0x400
lea rcx, str.defaults
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x402430
mov r9, rbx
lea r12, [0x0040c040]
jmp 0x4023a0
lea rdx, str.pythonX
lea rcx, str.found_no_configured_value_for__ls_n
call fcn.004015a0
mov rax, r12
add rsp, 0x30
pop rbx
pop r12
pop r13
ret
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov rdx, r13
lea r9, [0x0040c040]
mov dword [rsp + 0x20], 0x400
lea rcx, str.defaults
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
jne 0x402419
jmp 0x4023d9
Function at 0x4028e0
Capabilities:
Read .ini file

Disassembly:
push r15
mov eax, 0x1048
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.004051f0
sub rsp, rax
xor r8d, r8d
xor edx, edx
mov r12, qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea rsi, [rsp + 0x40]
mov qword [rsp + 0x28], rcx
mov rbp, rcx
lea rcx, [0x00408028]
mov dword [rsp + 0x20], 0x400
mov r9, rsi
call r12
cmp eax, 0x3ff
je 0x402ab6
cmp word [rsp + 0x40], 0
mov rbx, qword [sym.imp.msvcrt.dll_isspace]
lea rdi, [rsp + 0x840]
lea r14, [0x0040d6a0]
mov r13, qword [sym.imp.msvcrt.dll_wcsncpy_s]
je 0x402a09
nop dword [rax + rax]
xor r8d, r8d
mov qword [rsp + 0x28], rbp
mov r9, rdi
mov rdx, rsi
mov dword [rsp + 0x20], 0x400
lea rcx, [0x00408028]
call r12
cmp eax, 0x3ff
je 0x402a20
movzx ecx, word [rsp + 0x840]
mov r15, rdi
test cx, cx
jne 0x4029ae
jmp 0x4029f2
movzx ecx, word [r15 + 2]
add r15, 2
test cx, cx
je 0x4029f2
call rbx
test eax, eax
jne 0x4029a0
mov rcx, rsi
call fcn.00402860
mov r15, rax
test rax, rax
je 0x402a40
mov r9, 0xffffffffffffffff
mov r8, rsi
mov edx, 0x104
mov rcx, r15
call r13
lea rcx, [r15 + 0x208]
mov r8, rdi
mov edx, 0x400
mov r9, 0xffffffffffffffff
call r13
mov rcx, rsi
call sub.msvcrt.dll_wcslen
lea rsi, [rsi + rax*2 + 2]
cmp word [rsi], 0
jne 0x402960
add rsp, 0x1048
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8, rsi
mov rdx, rbp
lea rcx, str.read_commands:__ls:_not_enough_space_for__ls_n
call fcn.004015a0
jmp 0x40298b
movsxd rax, dword [0x0040d688]
cmp eax, 0x63
jle 0x402a60
mov r8, rdi
mov rdx, rsi
lea rcx, str.cant_add__ls___ls:_no_room_n
call fcn.004015a0
jmp 0x4029f2
imul r15, rax, 0xa08
mov r10, qword [sym.imp.msvcrt.dll_wcsncpy_s]
lea edx, [rax + 1]
mov r8, rsi
mov dword [0x0040d688], edx
mov r9, 0xffffffffffffffff
mov edx, 0x104
mov qword [rsp + 0x38], r10
lea rcx, [r15 + r14]
call r10
mov r10, qword [rsp + 0x38]
mov r8, rdi
mov edx, 0x400
lea rcx, [r14 + r15 + 0x208]
mov r9, 0xffffffffffffffff
call r10
jmp 0x4029f2
mov rdx, rbp
lea rcx, str.read_commands:__ls:_not_enough_space_for_names_n
call fcn.004015a0
jmp 0x402932
Function at 0x404170
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.004053d0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.004053d0
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x4041e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x00459dd4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x404388
mov rax, qword [0x00459dd8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40422c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x4042b7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x404210
mov rcx, r12
call fcn.00404f40
mov rbp, rax
test rax, rax
je 0x4043c2
mov rax, qword [0x00459dd8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.00405070
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00459dd8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4043d1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x4042b0
sub eax, 4
and eax, 0xfffffffb
jne 0x404340
add dword [0x00459dd4], 1
cmp ebx, 8
jae 0x4042e8
test bl, 4
jne 0x404390
test ebx, ebx
je 0x4042d9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x4043b0
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x4042d9
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x40431a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x00459dd8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4042b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00404170
nop dword [rax]
xor edi, edi
jmp 0x404237
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x4042d9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x4042d9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.00404170
mov rax, qword [0x00459dd8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.00404170
nop
nop dword [rax]
Function at 0x404bb0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0045a0c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0045a0a0]
test rbx, rbx
je 0x404c04
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x404bfb
test r12, r12
je 0x404bfb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x404be0
lea rcx, [0x0045a0c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x404f40
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x00409530]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x404fb9
mov rcx, r10
call fcn.00404e10
test eax, eax
je 0x404fb9
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x404fb6
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x404fad
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x404fb9
add r8, 0x28
cmp r8, r9
jne 0x404f98
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret
Function at 0x140001250
Capabilities:
Create process on windows
Create process suspended
Terminate process

Disassembly:
push rbx
sub rsp, 0xf0
xor eax, eax
lea rcx, [rsp + 0x80]
xor edx, edx
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
lea r8d, [rax + 0x68]
call fcn.140005220
mov dword [rsp + 0x80], 0x68
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov qword [rsp + 0xd0], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov qword [rsp + 0xd8], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
xor ebx, ebx
mov dword [rsp + 0xbc], pe_nt_image_headers64
mov qword [rsp + 0xe0], rax
lea r8, str.test
lea rax, [rsp + 0x60]
mov qword [rsp + 0x50], rax
lea rdx, str.test
lea rax, [rsp + 0x80]
mov qword [rsp + 0x48], rax
lea r9d, [rbx + 2]
mov qword [rsp + 0x40], rbx
lea rax, str.cmd.exe
mov qword [rsp + 0x38], rbx
lea rcx, str.test
mov dword [rsp + 0x30], 4
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithLogonW]
test eax, eax
je 0x1400013bd
mov qword [rsp + 0x108], rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, qword [rsp + 0x60]
lea r9, [rsp + 0x100]
mov dword [rsp + 0x30], 2
lea edx, [rbx + 4]
mov r8, rax
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x60]
mov edx, 1
mov edi, eax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x1400013a4
mov rax, qword [rsp + 0x100]
mov rdi, qword [rsp + 0x108]
add rsp, 0xf0
pop rbx
ret
mov edx, edi
lea rcx, str.Error_duplicating_handle__d_n
call fcn.1400011f0
mov ecx, 1
call fcn.140006ad0
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error:__d_n
call fcn.1400011f0
mov ecx, 1
call fcn.140006ad0
int3
Function at 0x1400013e0
Capabilities:
Resume thread
Suspend thread

Disassembly:
push rbx
sub rsp, 0x50
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x20], rcx
call qword [sym.imp.KERNEL32.dll_SuspendThread]
lea rcx, str.ntdll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.NtImpersonateThread
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edx, edx
lea rcx, [rsp + 0x20]
mov rbx, rax
xor eax, eax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x34], 2
mov dword [rsp + 0x30], 0xc
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
mov rcx, qword [rsp + 0x20]
lea r8, [rsp + 0x30]
mov rdx, rcx
call rbx
mov rcx, qword [rsp + 0x20]
mov ebx, eax
test eax, eax
jne 0x140001497
lea r9, [rsp + 0x28]
xor r8d, r8d
lea edx, [rax + 6]
call qword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
je 0x1400014b6
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140002680
add rsp, 0x50
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov edx, ebx
lea rcx, str.Error_impersonating_thread__08X_n
call fcn.1400011f0
mov ecx, 1
call fcn.140006ad0
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_opening_thread_token:__d_n
call fcn.1400011f0
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, 1
call fcn.140006ad0
int3
Function at 0x140002ebc
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
sub rsp, 0x18
mov r8, rcx
mov eax, 0x5a4d
cmp word [0x140000000], ax
jne 0x140002f4d
movsxd rax, dword [0x14000003c]
lea rdx, [0x140000000]
lea rcx, [rax + rdx]
cmp dword [rcx], 0x4550
jne 0x140002f4d
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002f4d
sub r8, rdx
movzx eax, word [rcx + 0x14]
lea rdx, [rcx + 0x18]
add rdx, rax
movzx eax, word [rcx + 6]
lea rcx, [rax + rax*4]
lea r9, [rdx + rcx*8]
mov qword [rsp], rdx
cmp rdx, r9
je 0x140002f31
mov ecx, dword [rdx + 0xc]
cmp r8, rcx
jb 0x140002f2b
mov eax, dword [rdx + 8]
add eax, ecx
cmp r8, rax
jb 0x140002f33
add rdx, 0x28
jmp 0x140002f10
xor edx, edx
test rdx, rdx
jne 0x140002f3c
xor al, al
jmp 0x140002f53
test dword [rdx + 0x24], 0x80000000
je 0x140002f49
xor al, al
jmp 0x140002f53
mov al, 1
jmp 0x140002f53
xor al, al
jmp 0x140002f53
add rsp, 0x18
ret

Function at 0x140006ad0
Capabilities:
Parse pe header

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
push r15
sub rsp, 0x20
mov esi, r8d
mov ebx, edx
mov r14d, ecx
test r8d, r8d
jne 0x1400068a4
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400068a4
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400068a4
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400068a4
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400068a4
cmp dword [rcx + 0x84], 0xe
jbe 0x1400068a4
cmp dword [rcx + 0xf8], esi
je 0x1400068a4
mov ecx, r14d
call fcn.1400069ec
mov ecx, 2
call fcn.140009cac
nop
cmp byte [0x140021240], 0
jne 0x14000696e
mov r15d, 1
mov eax, r15d
xchg dword [0x140021230], eax
test ebx, ebx
jne 0x140006917
mov rdi, qword [section..data]
mov edx, edi
and edx, 0x3f
lea ecx, [rbx + 0x40]
sub ecx, edx
xor eax, eax
ror rax, cl
xor rax, rdi
mov rcx, qword [0x140021238]
cmp rcx, rax
je 0x14000690e
xor rdi, rcx
mov ecx, edx
ror rdi, cl
mov rcx, rdi
call qword [fcn.1400030e0]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call rdi
lea rcx, [0x1400213e8]
jmp 0x140006923
cmp ebx, r15d
jne 0x140006929
lea rcx, [0x140021400]
call fcn.140009508
nop
test ebx, ebx
jne 0x140006940
lea rdx, [0x140015328]
lea rcx, [0x140015308]
call fcn.140008f08
lea rdx, [0x140015338]
lea rcx, [0x140015330]
call fcn.140008f08
movzx eax, byte [0x140021240]
test esi, esi
cmove eax, r15d
mov byte [0x140021240], al
jmp 0x14000696e
mov ecx, 2
call fcn.140009d00
test esi, esi
jne 0x140006985
mov ecx, r14d
call fcn.1400069a0
int3
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
add rsp, 0x20
pop r15
ret
xor r8d, r8d
xor edx, edx
jmp 0x140006834
Function at 0x1400011c0
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rbp], rax
mov r13, rdx
movsxd r15, ecx
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
mov qword [rbp - 0x10], rax
movups xmmword [rsp + 0x70], xmm0
mov qword [rbp - 0x80], rax
movups xmmword [rsp + 0x50], xmm0
xor r8d, r8d
mov edx, r8d
mov qword [rsp + 0x60], rdx
mov ecx, 0xf
mov qword [rsp + 0x68], rcx
mov byte [rsp + 0x50], al
cmp r15, 1
jle 0x14000133d
mov esi, 1
lea r14d, [rax + 2]
nop dword [rax]
nop word [rax + rax]
mov r9, qword [r13 + rsi*8]
mov rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp byte [r9 + rbx], 0
jne 0x140001270
mov rax, rcx
sub rax, rdx
cmp rbx, rax
ja 0x1400012b4
lea rax, [rdx + rbx]
mov qword [rsp + 0x60], rax
lea rdi, [rsp + 0x50]
cmp rcx, 0x10
cmovae rdi, qword [rsp + 0x50]
add rdi, rdx
mov r8, rbx
mov rdx, r9
mov rcx, rdi
call sub.VCRUNTIME140.dll_memmove
mov byte [rdi + rbx], 0
jmp 0x1400012c6
mov qword [rsp + 0x20], rbx
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.140001460
cmp r14d, r15d
je 0x140001320
mov rcx, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x68]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x140001301
lea rax, [rcx + 1]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x50]
cmp rdx, 0x10
cmovae rax, qword [rsp + 0x50]
mov word [rax + rcx], 0x20
jmp 0x140001320
mov qword [rsp + 0x20], 1
lea r9, [0x140003360]
mov edx, 1
lea rcx, [rsp + 0x50]
call fcn.140001460
inc r14d
inc rsi
mov rcx, qword [rsp + 0x68]
cmp rsi, r15
jge 0x14000133a
mov rdx, qword [rsp + 0x60]
jmp 0x140001260
xor r8d, r8d
lea rdx, [rsp + 0x50]
cmp rcx, 0x10
cmovae rdx, qword [rsp + 0x50]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x30], r8
mov dword [rsp + 0x28], r8d
mov dword [rsp + 0x20], r8d
xor r9d, r9d
xor r8d, r8d
lea rcx, str.TBLBinariesWin64Chivalry2_Win64_Shipping.exe
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x1400013c7
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400013c2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400013c2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000165c
xor eax, eax
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.140001600
lea r11, [rsp + 0x110]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret