joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400c33d0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x138
call qword [sym.imp.msvcrt.dll_getenv]
mov byte [rsp + 0x20], 0
test rax, rax
je 0x1400c3415
lea rdx, [rsp + 0x20]
mov r8d, 0x104
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [rsp + 0x20], 0
je 0x1400c3415
lea rcx, [rsp + 0x20]
call qword [str.0__n_]
add rsp, 0x138
ret
xor eax, eax
add rsp, 0x138
ret

Function at 0x1400c5060
Capabilities:
Generate random numbers via winapi

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdi, rcx
mov rbx, rdx
lea rcx, [rsp + 0x50]
mov r9d, 1
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x50], 0
mov dword [rsp + 0x20], 0xf0000040
call qword [sym.imp.ADVAPI32.DLL_CryptAcquireContextA]
test eax, eax
je 0x1400c50bc
mov rcx, qword [rsp + 0x50]
mov r8, rdi
mov edx, ebx
call qword [sym.imp.ADVAPI32.DLL_CryptGenRandom]
mov rcx, qword [rsp + 0x50]
xor edx, edx
test eax, eax
jne 0x1400c50cc
call qword [sym.imp.ADVAPI32.DLL_CryptReleaseContext]
mov eax, 1
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
call qword [sym.imp.ADVAPI32.DLL_CryptReleaseContext]
mov rbx, qword [rsp + 0x40]
xor eax, eax
add rsp, 0x30
pop rdi
ret

Function at 0x1400c8ab0
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x28
xor eax, eax
test edx, edx
lea r8, [rsp + 0x38]
setne al
mov edx, 0x8004667e
mov dword [rsp + 0x38], eax
call qword [sym.imp.WSOCK32.DLL_ioctlsocket]
add rsp, 0x28
ret
Function at 0x1400c8b30
Capabilities:
Resolve dns

Disassembly:
push rbx
push r12
push r13
push r14
push r15
sub rsp, 0x20
xor r13d, r13d
mov r12, r9
mov qword [r9], r13
lea r9, [rsp + 0x68]
mov ebx, r13d
mov r15d, r13d
call qword [sym.imp.WS2_32.DLL_getaddrinfo]
mov r14d, eax
test eax, eax
jne 0x1400c8cf4
mov qword [rsp + 0x58], rsi
mov rsi, qword [rsp + 0x68]
mov qword [rsp + 0x60], rdi
test rsi, rsi
je 0x1400c8cd4
mov qword [rsp + 0x50], rbp
mov eax, dword [rsi + 4]
cmp eax, 2
jne 0x1400c8b8d
lea ebp, [rax + 0xe]
jmp 0x1400c8b99
cmp eax, 0x17
jne 0x1400c8c41
lea ebp, [rax + 5]
cmp qword [rsi + 0x20], r13
je 0x1400c8c41
mov rax, qword [rsi + 0x10]
test rax, rax
je 0x1400c8c41
cmp rax, rbp
jb 0x1400c8c41
mov ecx, 0x30
call qword [sub.msvcrt.dll_malloc]
mov rdi, rax
test rax, rax
je 0x1400c8c7c
mov ecx, dword [rsi]
mov dword [rax], ecx
mov ecx, dword [rsi + 4]
mov dword [rax + 4], ecx
mov ecx, dword [rsi + 8]
mov dword [rax + 8], ecx
mov ecx, dword [rsi + 0xc]
mov dword [rax + 0x10], ebp
mov dword [rax + 0xc], ecx
mov rcx, rbp
mov qword [rax + 0x20], r13
mov qword [rax + 0x18], r13
mov qword [rax + 0x28], r13
call qword [sub.msvcrt.dll_malloc]
mov qword [rdi + 0x20], rax
test rax, rax
je 0x1400c8c6b
mov rdx, qword [rsi + 0x20]
mov r8, rbp
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsi + 0x18]
test rcx, rcx
je 0x1400c8c2e
call qword [str.0__n_]
mov qword [rdi + 0x18], rax
test rax, rax
je 0x1400c8c50
test rbx, rbx
cmove rbx, rdi
test r15, r15
je 0x1400c8c3e
mov qword [r15 + 0x28], rdi
mov r15, rdi
mov rsi, qword [rsi + 0x28]
test rsi, rsi
jne 0x1400c8b80
jmp 0x1400c8c82
mov rcx, qword [rdi + 0x20]
mov r14d, 8
call qword [sub.msvcrt.dll_free]
mov rcx, rdi
call qword [sub.msvcrt.dll_free]
jmp 0x1400c8c82
mov rcx, rdi
mov r14d, 8
call qword [sub.msvcrt.dll_free]
jmp 0x1400c8c82
mov r14d, 8
mov rcx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x50]
test rcx, rcx
je 0x1400c8c97
call qword [sym.imp.WS2_32.DLL_freeaddrinfo]
test r14d, r14d
je 0x1400c8ccf
test rbx, rbx
je 0x1400c8cca
mov rcx, qword [rbx + 0x20]
call qword [sub.msvcrt.dll_free]
mov rcx, qword [rbx + 0x18]
call qword [sub.msvcrt.dll_free]
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call qword [sub.msvcrt.dll_free]
mov rbx, rdi
test rdi, rdi
jne 0x1400c8ca1
mov rbx, r13
jmp 0x1400c8ce3
test rbx, rbx
jne 0x1400c8ce3
mov r14d, 0x2af9
mov ecx, r14d
call qword [sym.imp.WSOCK32.DLL_WSASetLastError]
mov rdi, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x58]
mov qword [r12], rbx
mov eax, r14d
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rbx
ret
Function at 0x1400cacc0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov rcx, qword [rcx]
mov rdi, r8
cmp dword [rcx + 8], 2
mov rsi, rdx
jne 0x1400cad0a
mov rax, qword [rbx + 0x18]
test rax, rax
jne 0x1400cacfa
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov r9, qword [rcx + 0x10]
mov edx, 1
mov rcx, rsi
call rax
jmp 0x1400cad54
cmp qword [rbx + 0x10], 0
jne 0x1400cad3f
mov rcx, qword [rcx + 0x10]
lea rdx, [0x1400e7834]
call qword [sym.imp.msvcrt.dll_fopen]
mov qword [rbx + 0x10], rax
test rax, rax
jne 0x1400cad3f
or rax, 0xffffffffffffffff
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov r9, qword [rbx + 0x10]
mov r8, rdi
mov edx, 1
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_fread]
mov rdi, rax
test rax, rax
jne 0x1400cad78
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x1400cad6f
call qword [sym.imp.msvcrt.dll_fclose]
mov qword [rbx + 0x10], rdi
mov rax, qword [rbx]
mov rcx, qword [rax]
mov qword [rbx], rcx
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rax, rdi
add rsp, 0x20
pop rdi
ret

Function at 0x1400ccf80
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
movsxd rbx, edx
mov rdi, rcx
mov byte [rcx], 0
mov edx, ebx
call qword [sym.imp.WSOCK32.DLL_gethostname]
mov byte [rbx + rdi - 1], 0
test eax, eax
jne 0x1400ccfba
lea edx, [rax + 0x2e]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_strchr]
test rax, rax
je 0x1400ccfb8
mov byte [rax], 0
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x1400cf300
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ebp, r8d
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
mov r14, rdx
add rax, 0x18
add rcx, rax
call qword [sub.msvcrt.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x1400cf342
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rsp + 0x48], rsi
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x1400cf385
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + 8]
mov r14d, dword [rbx + 0x18]
mov rdx, qword [rdi + 8]
add r14, qword [rdi + 0x10]
mov rcx, r14
call qword [rbx + 0x10]
mov ebp, dword [rbx + 0x20]
mov rcx, qword [rdi + 8]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x1400cf3e1
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
mov r8d, 1
xor al, 0x36
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + 8]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
mov r8d, 1
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 0x10]
call qword [rbx + 8]
dec rbp
jne 0x1400cf3a0
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x1400cf423
nop dword [rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x1400f4782]
mov r8d, 1
call qword [rbx + 8]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1400f4783]
mov r8d, 1
call qword [rbx + 8]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x1400cf3f0
mov rsi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
mov rax, rdi
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x1800016f0
Capabilities:
Hook routines via microsoft detours

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x58
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
call fcn.180001c80
mov qword [rsp + 0x28], 0
cmp qword [0x180009168], 0
jne 0x180001738
cmp qword [0x180009160], 0
je 0x180001738
mov rax, qword [0x180009160]
mov qword [0x180009168], rax
cmp qword [0x180009168], 0
je 0x1800017de
mov rax, qword [0x180009168]
cmp qword [rax + 0x10], 0
je 0x1800017de
mov rax, qword [0x180009168]
mov rcx, qword [rsp + 0x38]
cmp qword [rax + 0x10], rcx
jb 0x1800017de
mov rax, qword [0x180009168]
mov rcx, qword [rsp + 0x30]
cmp qword [rax + 0x10], rcx
ja 0x1800017de
mov rax, qword [0x180009168]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x38]
cmp qword [rsp + 0x28], rax
jb 0x1800017a4
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x28], rax
jbe 0x1800017ab
xor eax, eax
jmp 0x180001955
mov rax, qword [0x180009168]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x48]
mov qword [rax + 0x10], rcx
mov r8d, 0x60
mov edx, 0xcc
mov rcx, qword [rsp + 0x28]
call fcn.180005f21
mov rax, qword [rsp + 0x28]
jmp 0x180001955
mov rax, qword [0x180009160]
mov qword [0x180009168], rax
jmp 0x180001800
mov rax, qword [0x180009168]
mov rax, qword [rax + 8]
mov qword [0x180009168], rax
cmp qword [0x180009168], 0
je 0x18000184d
cmp qword [0x180009168], 0
je 0x18000184b
mov rax, qword [0x180009168]
cmp qword [rax + 0x10], 0
je 0x18000184b
mov rax, qword [0x180009168]
mov rcx, qword [rsp + 0x38]
cmp qword [rax + 0x10], rcx
jb 0x18000184b
mov rax, qword [0x180009168]
mov rcx, qword [rsp + 0x30]
cmp qword [rax + 0x10], rcx
ja 0x18000184b
jmp 0x18000177c
jmp 0x1800017ee
mov rax, qword [rsp + 0x60]
and rax, 0xffff
mov eax, eax
mov rcx, qword [rsp + 0x60]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x60], rax
mov r8, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
call fcn.180001960
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x180001953
mov rax, qword [rsp + 0x48]
mov qword [0x180009168], rax
mov rax, qword [0x180009168]
mov dword [rax], 0x52727464
mov rax, qword [0x180009168]
mov qword [rax + 0x10], 0
mov rax, qword [0x180009168]
mov rcx, qword [0x180009160]
mov qword [rax + 8], rcx
mov rax, qword [0x180009168]
mov qword [0x180009160], rax
mov qword [rsp + 0x40], 0
mov rax, qword [0x180009168]
add rax, 0x60
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x2a8
jmp 0x180001904
mov eax, dword [rsp + 0x20]
dec eax
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 1
jle 0x18000193e
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x60
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x40]
mov qword [rcx + rax + 0x48], rdx
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x60
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
jmp 0x1800018fa
mov rax, qword [0x180009168]
mov rcx, qword [rsp + 0x40]
mov qword [rax + 0x10], rcx
jmp 0x18000177c
xor eax, eax
add rsp, 0x58
ret
Function at 0x180002670
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x78
mov r8d, 0x30
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x80]
call fcn.180004fc1
nop
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1800026b7
xor al, al
jmp 0x180002759
mov rax, qword [rsp + 0x28]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
cmp dword [rax], 0x4550
je 0x1800026e1
xor al, al
jmp 0x180002759
mov eax, 8
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x30]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
cmp qword [rsp + 0x88], rax
jb 0x180002751
mov eax, 8
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x30]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov ecx, 8
imul rcx, rcx, 0xc
mov rdx, qword [rsp + 0x30]
mov ecx, dword [rdx + rcx + 0x8c]
add rax, rcx
cmp qword [rsp + 0x88], rax
jae 0x180002751
mov al, 1
jmp 0x180002759
jmp 0x180002757
xor al, al
add rsp, 0x78
ret
Function at 0x140020c80
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
mov eax, 0x10090
call fcn.140024f20
sub rsp, rax
mov rax, qword [0x140061f80]
xor rax, rsp
mov qword [rsp + 0x10080], rax
movzx eax, byte [rcx]
lea rbx, [rsp + 0x30]
xor ebp, ebp
mov rsi, rcx
mov word [rsp + 0x80], bp
mov edi, 0x28
mov word [rsp + 0x30], bp
test al, al
je 0x140020d42
nop dword [rax]
nop word [rax + rax]
mov r8d, 2
mov byte [rsp + 0x20], al
lea rdx, [rsp + 0x20]
mov byte [rsp + 0x21], bpl
lea rcx, [rsp + 0x24]
call fcn.140033e04
cmp rax, 1
jne 0x140020d9e
mov rcx, rdi
mov rax, rbx
cmp word [rbx], bp
je 0x140020d1f
add rax, 2
dec rcx
cmp word [rax], bp
jne 0x140020d13
cmp rcx, 1
jb 0x140020d9e
movzx ecx, word [rsp + 0x24]
inc rsi
mov word [rax], cx
add rbx, 2
mov word [rax + 2], bp
dec rdi
movzx eax, byte [rsi]
test al, al
jne 0x140020ce0
mov r8d, 0x10000
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0xffff
ja 0x140020d73
lea rcx, [rsp + 0x80]
call fcn.140036a38
jmp 0x140020d75
xor eax, eax
mov rcx, qword [rsp + 0x10080]
xor rcx, rsp
call fcn.140024c50
lea r11, [rsp + 0x10090]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
call fcn.1400283e0
int3
Function at 0x140021a30
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
cmp byte [0x14006394e], 0
mov rsi, r8
mov rdi, rdx
mov rbp, rcx
jne 0x140021ab5
mov edx, 3
xor ecx, ecx
mov r8d, 0xa
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [0x140063710], rax
xor ecx, ecx
mov ebx, dword [rax]
lea rdx, [rax + 4]
mov qword [0x140063710], rdx
mov r8d, dword [rdx]
add rdx, 4
mov qword [0x140063710], rdx
call fcn.14001f9d0
cmp eax, ebx
jne 0x140021c1d
mov byte [0x14006394e], 1
lea rdx, [0x140045300]
mov rcx, rsi
call fcn.1400358b0
test eax, eax
je 0x140021b40
cmp byte [0x14006394d], 1
je 0x140021b40
call qword [sym.imp.python313.dll_PyDict_New]
mov qword [0x1400646c0], rax
call qword [sym.imp.python313.dll_PyDict_New]
mov qword [0x1400646c8], rax
call qword [sym.imp.python313.dll_PyDict_New]
mov qword [0x1400646d0], rax
call qword [sym.imp.python313.dll_PyDict_New]
mov qword [0x1400646d8], rax
call qword [sym.imp.python313.dll_PyDict_New]
mov qword [0x1400646e0], rax
call qword [sym.imp.python313.dll_PyDict_New]
mov qword [0x1400646e8], rax
call qword [sym.imp.python313.dll_PyDict_New]
mov qword [0x1400646f0], rax
call qword [sym.imp.python313.dll_PyDict_New]
mov qword [0x1400646f8], rax
mov byte [0x14006394d], 1
mov r8, qword [0x140063710]
mov rax, rsi
mov rdx, r8
sub rdx, rsi
movzx ecx, byte [rax]
xor r9d, r9d
cmp cl, byte [rax + rdx]
jne 0x140021b67
inc rax
test cl, cl
jne 0x140021b50
mov ecx, r9d
jmp 0x140021b6c
sbb ecx, ecx
or ecx, 1
mov rax, 0xffffffffffffffff
cmp byte [r8 + rax + 1], r9b
lea rax, [rax + 1]
jne 0x140021b73
lea rdx, [r8 + rax]
mov eax, dword [r8 + rax + 1]
add rdx, 5
test ecx, ecx
je 0x140021bd8
nop
add rdx, rax
mov rax, rsi
mov r8, rdx
sub r8, rsi
nop dword [rax]
movzx ecx, byte [rax]
cmp cl, byte [rax + r8]
jne 0x140021bb5
inc rax
test cl, cl
jne 0x140021ba0
mov ecx, r9d
jmp 0x140021bba
sbb ecx, ecx
or ecx, 1
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rdx + rax], r9b
jne 0x140021bc1
add rdx, rax
mov eax, dword [rdx + 1]
add rdx, 5
test ecx, ecx
jne 0x140021b90
movzx ecx, word [rdx]
lea rax, [rdx + 2]
cmp r9w, cx
jae 0x140021c08
mov ebx, ecx
nop word [rax + rax]
mov r8, rax
mov rdx, rdi
mov rcx, rbp
call fcn.14001e100
add rdi, 8
sub rbx, 1
jne 0x140021bf0
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
lea rcx, str.Error__corrupted_constants_object
call fcn.140030644
call fcn.1400283e0
int3
Function at 0x1400247c0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x90
mov rax, qword [0x140061f80]
xor rax, rsp
mov qword [rsp + 0x80], rax
movzx eax, byte [rcx]
lea rbx, [rsp + 0x30]
xor r14d, r14d
mov rbp, rdx
mov word [rsp + 0x30], r14w
mov rsi, rcx
mov edi, 0x28
test al, al
je 0x140024871
nop word [rax + rax]
mov r8d, 2
mov byte [rsp + 0x20], al
lea rdx, [rsp + 0x20]
mov byte [rsp + 0x21], r14b
lea rcx, [rsp + 0x24]
call fcn.140033e04
cmp rax, 1
jne 0x1400248a7
mov rcx, rdi
mov rax, rbx
cmp word [rbx], r14w
je 0x14002484d
add rax, 2
dec rcx
cmp word [rax], r14w
jne 0x140024840
cmp rcx, 1
jb 0x1400248a7
movzx ecx, word [rsp + 0x24]
inc rsi
mov word [rax], cx
add rbx, 2
mov word [rax + 2], r14w
dec rdi
movzx eax, byte [rsi]
test al, al
jne 0x140024810
mov rdx, rbp
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140024c50
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
call fcn.1400283e0
int3

Function at 0x140024ad0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x140061f80]
xor rax, rsp
mov qword [rsp + 0x80], rax
movzx eax, byte [rcx]
lea rbx, [rsp + 0x30]
xor ebp, ebp
mov rsi, rcx
mov word [rsp + 0x30], bp
mov edi, 0x28
test al, al
je 0x140024b7f
nop dword [rax]
nop dword [rax + rax]
mov r8d, 2
mov byte [rsp + 0x20], al
lea rdx, [rsp + 0x20]
mov byte [rsp + 0x21], bpl
lea rcx, [rsp + 0x24]
call fcn.140033e04
cmp rax, 1
jne 0x140024bb5
mov rcx, rdi
mov rax, rbx
cmp word [rbx], bp
je 0x140024b5c
nop
add rax, 2
dec rcx
cmp word [rax], bp
jne 0x140024b50
cmp rcx, 1
jb 0x140024bb5
movzx ecx, word [rsp + 0x24]
inc rsi
mov word [rax], cx
add rbx, 2
mov word [rax + 2], bp
dec rdi
movzx eax, byte [rsi]
test al, al
jne 0x140024b20
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140024c50
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
call fcn.1400283e0
int3

Function at 0x140025684
Capabilities:
Parse pe header

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

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x140029ac3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140029ac3
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140029ac3
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140029ac3
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140029ac3
cmp dword [rcx + 0x84], 0xe
jbe 0x140029ac3
cmp dword [rcx + 0xf8], 0
je 0x140029ac3
mov ecx, ebx
call fcn.140029b74
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140029950
nop
cmp dword [rbp + 0x20], 0
je 0x140029b11
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140029b1c
int3
xor r8d, r8d
xor edx, edx
jmp 0x140029a54

Function at 0x140029c58
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x140029ac3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140029ac3
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140029ac3
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140029ac3
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140029ac3
cmp dword [rcx + 0x84], 0xe
jbe 0x140029ac3
cmp dword [rcx + 0xf8], 0
je 0x140029ac3
mov ecx, ebx
call fcn.140029b74
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140029950
nop
cmp dword [rbp + 0x20], 0
je 0x140029b11
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140029b1c
int3
xor r8d, r8d
xor edx, edx
jmp 0x140029a54
Function at 0x14003b990
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14003ba17
mov rsi, rbx
cmp word [rax], bp
je 0x14003b9d6
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14003b9c0
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14003b9bc
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140036f10
mov rdi, rax
test rax, rax
je 0x14003ba04
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140041d10
mov rbp, rdi
xor ecx, ecx
call fcn.140037a58
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14003e11c
Capabilities:
Get file size

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

Function at 0x140041af0
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140016060]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140016070]
mov dword [rax], 1
mov rax, qword [0x140016080]
mov dword [rax], 1
mov rax, qword [0x140015fc0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140016050]
mov dword [0x14001900c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x140016140]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140016120]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140015fa0]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a