joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140066f84
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.140055498
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14006700e
cmp byte [rbp - 0x21], r15b
je 0x140067009
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140067044
call fcn.14005d09c
test eax, eax
jne 0x140067030
cmp byte [rbp - 0x21], r15b
je 0x140067028
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140067044
cmp byte [rbp - 0x21], r15b
je 0x140067041
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.140060d94
test eax, eax
jne 0x1400670e4
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140055498
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140067083
cmp byte [rbp - 0x21], r15b
je 0x1400670b8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400670b8
call fcn.14005d09c
test eax, eax
jne 0x1400670a4
cmp byte [rbp - 0x21], r15b
je 0x14006709d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400670b8
cmp byte [rbp - 0x21], r15b
je 0x1400670b5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.140060d94
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400670e4
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400670e7
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400670f5
mov rcx, rdi
call fcn.14005ce4c
cmp byte [rbp + 0x3f], r15b
je 0x140067104
mov rcx, qword [rbp + 0x27]
call fcn.14005ce4c
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x140067e34
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.14005b8f8
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14005b8f8
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140067f84
cmp rax, 0xffffffffffffffff
je 0x140067f84
xor edi, edi
test rbp, rbp
jle 0x140067f2f
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14005cdd4
mov rbx, rax
test rax, rax
jne 0x140067ebc
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140067f25
mov edx, 0x8000
mov ecx, r14d
call fcn.14005ac10
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.14005e0a0
cmp eax, 0xffffffff
je 0x140067f05
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140067ecc
mov edx, r15d
mov ecx, r14d
call fcn.14005ac10
jmp 0x140067f25
cmp byte [rsi + 0x38], dil
je 0x140067f1c
cmp dword [rsi + 0x34], 5
jne 0x140067f1c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140067f25
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14005ce4c
jmp 0x140067f98
jns 0x140067f98
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14005b8f8
cmp rax, 0xffffffffffffffff
jne 0x140067f50
cmp byte [rsi + 0x30], dil
je 0x140067f98
mov edi, dword [rsi + 0x2c]
jmp 0x140067f98
mov ecx, r14d
call fcn.14006365c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140067f98
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 0x140067f98
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140067f91
mov eax, dword [rsi + 0x2c]
jmp 0x140067f96
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14005b8f8
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 0x140069340
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140069368
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140069368
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x1401c4fa0]
mov dword [rax], 1
mov rax, qword [0x1401c4fb0]
mov dword [rax], 1
mov rax, qword [0x1401c4fc0]
mov dword [rax], 1
mov rax, qword [0x1401c4f20]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
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 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x14013c2f0
Capabilities:
Query environment variable

Disassembly:
push r14
mov eax, 0x10080
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14019fa60
sub rsp, rax
xor eax, eax
xor edx, edx
xor esi, esi
mov r14d, 0x28
movzx edi, byte [rcx]
mov word [rsp + 0x80], ax
mov r12, rcx
lea rbp, [rsp + 0x30]
lea r13, [rsp + 0x2e]
mov word [rsp + 0x30], dx
test dil, dil
je 0x14013c399
nop dword [rax]
mov rax, r14
lea rbx, [rbp + rsi*2]
sub rax, rsi
cmp word [rbp + rsi*2], 0
je 0x14013c35e
nop dword [rax + rax]
add rbx, 2
sub rax, 1
cmp word [rbx], 0
jne 0x14013c350
test rax, rax
je 0x1401b097e
mov rcx, rbx
add rsi, 1
call sub.msvcrt.dll_wcslen
mov r8d, 2
mov rdx, r13
mov byte [rsp + 0x2e], dil
lea rcx, [rbx + rax*2]
mov byte [rsp + 0x2f], 0
call sub.msvcrt.dll_mbstowcs
movzx edi, byte [r12 + rsi]
test dil, dil
jne 0x14013c338
lea rbx, [rsp + 0x80]
mov r8d, 0x10000
mov rcx, rbp
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [rax - 1]
xor eax, eax
cmp edx, 0xffff
ja 0x14013c3c8
mov rcx, rbx
call sub.msvcrt.dll__wcsdup
add rsp, 0x10080
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret

Function at 0x14013c3e0
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
xor eax, eax
xor esi, esi
mov r13d, 0x28
movzx edi, byte [rcx]
mov word [rsp + 0x30], ax
mov rbp, rcx
mov r14, rdx
lea r15, [rsp + 0x30]
lea r12, [rsp + 0x2e]
test dil, dil
je 0x14013c481
nop word [rax + rax]
mov rax, r13
lea rbx, [r15 + rsi*2]
sub rax, rsi
cmp word [r15 + rsi*2], 0
je 0x14013c446
nop word [rax + rax]
add rbx, 2
sub rax, 1
cmp word [rbx], 0
jne 0x14013c438
test rax, rax
je 0x1401b0984
mov rcx, rbx
add rsi, 1
call sub.msvcrt.dll_wcslen
mov r8d, 2
mov rdx, r12
mov byte [rsp + 0x2e], dil
lea rcx, [rbx + rax*2]
mov byte [rsp + 0x2f], 0
call sub.msvcrt.dll_mbstowcs
movzx edi, byte [rbp + rsi]
test dil, dil
jne 0x14013c420
mov rdx, r14
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140153860
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rsi, str.NUITKA_ONEFILE_BINARY
mov ebx, ecx
mov rcx, rsi
call fcn.14013c2f0
test rax, rax
je 0x1401539a0
mov rdx, 0xffffffffffffffff
mov rcx, rax
lea r14, [rsp + 0x40]
mov r15d, 0x4e
call qword [sym.imp.python310.dll_PyUnicode_FromWideChar]
mov rdi, r14
lea r12, [rsi + 0x28]
lea rbp, [rsp + 0x3e]
mov r13, rax
xor eax, eax
mov word [rsp + 0x40], ax
nop
mov rax, r12
mov rbx, rdi
sub rax, rsi
cmp word [rdi], 0
je 0x1401538de
nop
add rbx, 2
sub rax, 1
cmp word [rbx], 0
jne 0x1401538d0
test rax, rax
je 0x1401b0a3c
mov rcx, rbx
add rsi, 1
add rdi, 2
call sub.msvcrt.dll_wcslen
mov r8d, 2
mov rdx, rbp
mov byte [rsp + 0x3e], r15b
lea rcx, [rbx + rax*2]
mov byte [rsp + 0x3f], 0
call sub.msvcrt.dll_mbstowcs
movzx r15d, byte [rsi]
test r15b, r15b
jne 0x1401538c0
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rax, qword [sym.imp.python310.dll__PyRuntime]
mov rdx, qword [0x1401dfcc0]
mov rsi, qword [rax + 0x1f0]
mov rax, qword [0x1401c50f0]
mov rbx, qword [rax + 0x1b8]
test rdx, rdx
je 0x1401539f8
mov r8, rbx
mov rcx, rsi
call fcn.14013ed60
mov r8, r13
mov rcx, rsi
mov rbx, rax
mov rdx, rax
call fcn.1401504d0
sub qword [rbx], 1
jne 0x140153989
mov rdx, qword [rbx + 8]
mov qword [rsp + 0x28], rax
mov rcx, rbx
call qword [rdx + 0x30]
mov rax, qword [rsp + 0x28]
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [0x1401df588]
lea rsi, [0x1401df588]
test bl, bl
je 0x1401539c0
mov rax, qword [0x1401df590]
lea rsi, [0x1401df590]
test rax, rax
jne 0x140153989
cmp byte [0x1401df7a2], 0
jne 0x1401539d6
movzx ecx, bl
call fcn.14011cff0
mov rdx, 0xffffffffffffffff
lea rcx, [0x1401df5a0]
call qword [sym.imp.python310.dll_PyUnicode_FromWideChar]
mov qword [rsi], rax
test rax, rax
je 0x140153a25
add qword [rax], 1
jmp 0x140153989
mov rdx, qword [0x1401dfc38]
mov rdi, qword [rax + 0x1a8]
test rdx, rdx
je 0x140153a30
mov r8, rdi
mov rcx, rsi
call fcn.14013ed60
mov qword [0x1401dfcc0], rax
mov rdx, rax
jmp 0x140153953
call qword [sym.imp.python310.dll_PyErr_Print]
call sub.msvcrt.dll_abort
lea rcx, [0x1401bd85e]
call qword [sym.imp.python310.dll_PyImport_ImportModule]
mov qword [0x1401dfc38], rax
mov rdx, rax
test rax, rax
je 0x1401b0a3c
jmp 0x140153a0b
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call qword [sym.imp.python310.dll_PyErr_NoMemory]
call sub.msvcrt.dll_abort
nop
Function at 0x140195b10
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp byte [0x1401df571], 0
mov rbp, rcx
mov r12, rdx
mov rdi, r8
je 0x140195b98
lea rdx, [0x1401c0e4a]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x140195c00
mov rbx, qword [0x1401df428]
jmp 0x140195b55
lea rbx, [rdx + rax + 4]
mov rdx, rbx
mov rcx, rdi
call sub.msvcrt.dll_strcmp
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_strlen
lea rdx, [rbx + rax + 1]
mov eax, dword [rdx]
test esi, esi
jne 0x140195b50
movzx r9d, word [rdx + 4]
lea r8, [rdx + 6]
mov rcx, rbp
mov rdx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.140184d50
mov r8d, 0xa
xor ecx, ecx
mov edx, 3
call qword [sym.imp.KERNEL32.dll_FindResourceA]
xor ecx, ecx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
xor ecx, ecx
lea rdx, [rax + 4]
mov qword [0x1401df428], rax
mov ebx, dword [rax]
mov qword [0x1401df428], rdx
mov r8d, dword [rax + 4]
lea rdx, [rax + 8]
mov qword [0x1401df428], rdx
call fcn.140194c40
cmp eax, ebx
jne 0x140195c87
mov byte [0x1401df571], 1
jmp 0x140195b2c
cmp byte [0x1401df570], 0
jne 0x140195b43
mov rbx, qword [sym.imp.python310.dll_PyDict_New]
call rbx
mov qword [0x1401dfec8], rax
call rbx
mov qword [0x1401dfec0], rax
call rbx
mov qword [0x1401dfeb8], rax
call rbx
mov qword [0x1401dfeb0], rax
call rbx
mov qword [0x1401dfea8], rax
call rbx
mov qword [0x1401dfea0], rax
call rbx
mov qword [0x1401dfe98], rax
call rbx
mov byte [0x1401df570], 1
mov qword [0x1401dfe90], rax
mov rax, qword [sym.imp.python310.dll__PyRuntime]
mov rax, qword [rax + 0x1f0]
mov rax, qword [rax + 0x10]
add rax, 0xda0
mov qword [0x1401df420], rax
jmp 0x140195b43
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x14019e740
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 fcn.1401afed0
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.1401afed0
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
Function at 0x14019f412
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1401e0388]
test eax, eax
je 0x14019f4aa
lea rax, [0x1401e0360]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1401e0390]
mov qword [rbp - 8], rax
jmp 0x14019f48e
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 0x14019f482
cmp qword [rbp - 0x10], 0
je 0x14019f482
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 0x14019f448
lea rax, [0x1401e0360]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14019f4ab
nop
add rsp, 0x30
pop rbp
ret

Function at 0x14019f5b0
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 0x14019f5d8
mov eax, 0
jmp 0x14019f626
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 0x14019f601
mov eax, 0
jmp 0x14019f626
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 0x14019f621
mov eax, 0
jmp 0x14019f626
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x14019f62c
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 0x14019f6aa
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x14019f6a1
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 0x14019f6a1
mov rax, qword [rbp - 8]
jmp 0x14019f6bf
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 0x14019f674
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x100401080
Capabilities:
Terminate process
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [str.clear]
call sub.msys_2.0.dll___getreent
mov r8, rbx
lea rdx, str.Usage:__s__options__n
mov rcx, qword [rax + 0x18]
call sub.msys_2.0.dll_fprintf
call sub.msys_2.0.dll___getreent
mov r8d, 0x82
mov edx, 1
lea rcx, str._nOptions:_n___T_TERM_____use_this_instead_of__TERM_n___V__________print_curses_version_n___x__________do_not_try_to_clear_scrollback_n
mov r9, qword [rax + 0x18]
call sub.msys_2.0.dll_fwrite
mov ecx, 1
call sub.msys_2.0.dll_exit
nop
nop
jmp 0x100401490
jmp qword [sym.imp.msys_2.0.dll_putchar]

Function at 0x100401180
Capabilities:
Terminate process

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x30
mov dword [0x10040704c], 2
mov r12, rcx
mov ebx, edx
mov rdx, rcx
mov ecx, 2
call sub.msys_2.0.dll_tcgetattr
test eax, eax
js 0x1004011f0
movdqu xmm0, xmmword [r12]
mov byte [section..bss], 1
movaps xmmword [0x100407020], xmm0
movdqu xmm1, xmmword [r12 + 0x10]
movaps xmmword [0x100407030], xmm1
mov rax, qword [r12 + 0x20]
mov qword [0x100407040], rax
mov eax, dword [r12 + 0x28]
mov dword [0x100407048], eax
mov eax, dword [0x10040704c]
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
mov rdx, r12
mov ecx, 1
mov dword [0x10040704c], 1
call sub.msys_2.0.dll_tcgetattr
test eax, eax
jns 0x1004011a8
mov dword [0x10040704c], 0
xor ecx, ecx
mov rdx, r12
call sub.msys_2.0.dll_tcgetattr
test eax, eax
jns 0x1004011a8
test bl, bl
je 0x1004012b0
lea rcx, str._dev_tty
mov edx, 2
call sub.msys_2.0.dll_open
mov dword [0x10040704c], eax
mov ecx, eax
test eax, eax
jns 0x1004012d0
call sub.msys_2.0.dll___errno
mov ebx, dword [rax]
mov ecx, ebx
call sub.msys_2.0.dll_strerror
mov r12, rax
mov rax, qword [0x100403100]
mov rsi, qword [rax]
call sub.msys_2.0.dll___getreent
lea r9, str.terminal_attributes
lea rdx, str._s:__s:__s_n
mov rcx, qword [rax + 0x18]
mov qword [rsp + 0x20], r12
mov r8, rsi
call sub.msys_2.0.dll_fprintf
cmp byte [section..bss], 0
jne 0x1004012e5
call sub.msys_2.0.dll___getreent
mov ecx, 0xa
mov rdx, qword [rax + 0x18]
call sub.msys_2.0.dll_fputc
lea ecx, [rbx + 4]
call sub.msys_2.0.dll_exit
nop
call sub.msys_2.0.dll___getreent
mov rcx, qword [rax + 0x10]
call sub.msys_2.0.dll_fileno
mov dword [0x10040704c], eax
jmp 0x1004011e7
mov rdx, r12
call sub.msys_2.0.dll_tcgetattr
test eax, eax
jns 0x1004011e1
jmp 0x10040124c
mov ecx, dword [0x10040704c]
lea r8, [0x100407020]
mov edx, 3
call sub.msys_2.0.dll_tcsetattr
jmp 0x100401294
Function at 0x140005af4
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 rbp, r8
mov r14, rdx
mov rdi, rcx
test r8, r8
jg 0x140005b22
xor eax, eax
jmp 0x140005c08
cmp qword [rcx + 0x68], 0
je 0x140005b33
call fcn.140005c24
jmp 0x140005c08
mov rax, qword [rcx + 0x38]
mov rsi, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140005b4a
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140005b4c
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140005b7e
cmp rax, rbp
mov rbx, rbp
mov rcx, r14
cmovb rbx, rax
mov r8, rbx
call fcn.140021350
mov rax, qword [rdi + 0x50]
add r14, rbx
sub rsi, rbx
sub dword [rax], ebx
mov rcx, qword [rdi + 0x38]
movsxd rax, ebx
add qword [rcx], rax
cmp qword [rdi + 0x80], 0
je 0x140005c02
mov r8, qword [rdi + 0x18]
lea rax, [rdi + 0x70]
cmp qword [r8], rax
jne 0x140005bb5
mov rcx, qword [rdi + 0x88]
mov rdx, qword [rdi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
mov rax, qword [rdi + 0x50]
mov dword [rax], edx
mov ebx, 0xfff
jmp 0x140005bde
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call fcn.14000f358
add r14, rax
sub rsi, rax
cmp rax, rbx
jne 0x140005c02
cmp rsi, rbx
ja 0x140005bbc
test rsi, rsi
je 0x140005c02
mov r9, qword [rdi + 0x80]
mov r8, rsi
mov edx, 1
mov rcx, r14
call fcn.14000f358
sub rsi, rax
sub rbp, rsi
mov rax, rbp
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

Function at 0x14000743c
Capabilities:
Parse pe header

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

Function at 0x140011b44
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140011940
Function at 0x14001714c
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.140006d20
sub rsp, rax
mov rax, qword [0x140032040]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.140015d2c
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x14001719b
mov rax, rbp
jmp 0x1400172a3
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 + 0x34470]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.14001826c
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x34470]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x14001729f
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 0x14001729f
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.14001826c
test rax, rax
js 0x14001729f
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x14001729f
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140017291
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140017291
cmp byte [rcx], 0xd
jne 0x140017277
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x140017286
cmp byte [rcx + 1], 0xa
jne 0x140017286
inc rcx
jmp 0x140017286
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x32490]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x140017259
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x1400172a3
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.1400066c0
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 0x1400174c4
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1400174da
mov al, 1
jmp 0x14001753a
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1400174eb
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140017538
mov ecx, dword [rcx + 0x18]
nop
call fcn.14001ba10
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140017538
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140017538
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140017538
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14001753a
xor al, al
add rsp, 0x20
pop rbx
ret