joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400c5ff4
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1401e0c80]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x1400c604b
cmp word [rdx], r13w
jne 0x1400c604b
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1400c6050
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1400c6175
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x1400c6196
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1400c6089
mov rdx, r9
mov word [rbx], cx
jmp 0x1400c60b0
cmp r9, r8
jae 0x1400c60c0
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x1400c606a
jmp 0x1400c6175
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400c616a
cmp dword [rsp + 0x80], esi
je 0x1400c616a
lea r8, [0x1401e0c80]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1400c6142
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1400c6112
mov word [rbx], r13w
jmp 0x1400c6172
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x1400c611f
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1400c6172
cmp word [rsp + 0x70], r13w
jne 0x1400c614f
cmp rbx, r14
je 0x1400c610c
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.1400c7adc
cmp word [rsp + 0x70], r13w
je 0x1400c6175
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1401e0c80]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1400c616f
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1400c6175
Function at 0x1400c7fac
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.14002aa20
sub rsp, rax
mov rax, qword [0x1401cb558]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.1400abb30
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x1400c7ffb
mov rax, rbp
jmp 0x1400c8103
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 + 0x1e0c80]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.1400c7ad4
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x1e0c80]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x1400c80ff
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 0x1400c80ff
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.1400c7ad4
test rax, rax
js 0x1400c80ff
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x1400c80ff
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x1400c80f1
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x1400c80f1
cmp byte [rcx], 0xd
jne 0x1400c80d7
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x1400c80e6
cmp byte [rcx + 1], 0xa
jne 0x1400c80e6
inc rcx
jmp 0x1400c80e6
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x1cba40]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x1400c80b9
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x1400c8103
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.14002a970
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 0x1400c9a38
Capabilities:
Get file size

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

Function at 0x1400d3460
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.1400bffd4
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 0x1400d3501
cmp ebx, dword [rsp + 0x30]
je 0x1400d34fa
test esi, esi
je 0x1400d34fa
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x1400d34d5
sub r8w, 0x61
cmp r8w, 0x19
ja 0x1400d34e2
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x1400d34bf
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x1400d34e6
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x1400d3503
mov eax, 1
jmp 0x1400d3503
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1400ddd30
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.1400c7adc
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1400c7adc
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1400dde80
cmp rax, 0xffffffffffffffff
je 0x1400dde80
xor edi, edi
test rbp, rbp
jle 0x1400dde2b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1400c2854
mov rbx, rax
test rax, rax
jne 0x1400dddb8
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x1400dde21
mov edx, 0x8000
mov ecx, r14d
call fcn.1400ac79c
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.1400c93a4
cmp eax, 0xffffffff
je 0x1400dde01
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1400dddc8
mov edx, r15d
mov ecx, r14d
call fcn.1400ac79c
jmp 0x1400dde21
cmp byte [rsi + 0x38], dil
je 0x1400dde18
cmp dword [rsi + 0x34], 5
jne 0x1400dde18
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x1400dde21
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.1400c08bc
jmp 0x1400dde94
jns 0x1400dde94
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1400c7adc
cmp rax, 0xffffffffffffffff
jne 0x1400dde4c
cmp byte [rsi + 0x30], dil
je 0x1400dde94
mov edi, dword [rsi + 0x2c]
jmp 0x1400dde94
mov ecx, r14d
call fcn.1400ca2d8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1400dde94
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 0x1400dde94
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1400dde8d
mov eax, dword [rsi + 0x2c]
jmp 0x1400dde92
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1400c7adc
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 0x140011104
Capabilities:
Check if file exists

Disassembly:
jmp 0x140012d40
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x148
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x12
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x168]
mov rax, qword [0x140020040]
xor rax, rbp
mov qword [rbp + 0xf8], rax
lea rcx, [0x140026167]
call fcn.1400113ac
mov rax, qword [rbp + 0x120]
mov byte [rax + 8], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, qword [rbp + 0x128]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rcx, qword [rbp + 0x120]
mov qword [rcx], rax
mov rax, qword [rbp + 0x120]
cmp qword [rax], 0xffffffffffffffff
jne 0x140012e12
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x140012e01
mov rdx, qword [rbp + 0x128]
lea rcx, str.ERROR:_Handle_was_not_attached._Reason:__s_not_available._n
call fcn.1400111ae
jmp 0x140012e0d
lea rcx, str.ERROR___
call fcn.1400111ae
jmp 0x140012eb8
lea rax, [rbp + 8]
mov rdi, rax
xor eax, eax
mov ecx, 0x1c
rep stosb byte [rdi], al
lea rdx, [rbp + 8]
mov rax, qword [rbp + 0x120]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
jne 0x140012e48
lea rcx, str.failed_to_get_current_serial_parameters_
call fcn.1400111ae
jmp 0x140012eb8
mov dword [rbp + 0xc], 0x2580
mov byte [rbp + 0x1a], 8
mov byte [rbp + 0x1c], 0
mov byte [rbp + 0x1b], 0
mov eax, dword [rbp + 0x10]
and eax, 0xffffffcf
or eax, 0x10
mov dword [rbp + 0x10], eax
lea rdx, [rbp + 8]
mov rax, qword [rbp + 0x120]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
jne 0x140012e8d
lea rcx, str.ALERT:_Could_not_set_Serial_Port_parameters
call fcn.1400111ae
jmp 0x140012eb8
mov rax, qword [rbp + 0x120]
mov byte [rax + 8], 1
mov edx, 0xc
mov rax, qword [rbp + 0x120]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_PurgeComm]
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rax, qword [rbp + 0x120]
mov rdi, rax
lea rcx, [rbp - 0x40]
lea rdx, [0x14001cdc0]
call fcn.140011343
mov rax, rdi
mov rcx, qword [rbp + 0xf8]
xor rcx, rbp
call fcn.1400111c7
lea rsp, [rbp + 0x108]
pop rdi
pop rbp
ret

Function at 0x14001120d
Capabilities:
Terminate process

Disassembly:
jmp 0x140015d50
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 0x1400112a3
Capabilities:
Parse pe header

Disassembly:
jmp 0x140014c10
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140014c30
xor al, al
jmp 0x140014cb1
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140014c43
xor al, al
jmp 0x140014cb1
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 0x140014c6d
xor al, al
jmp 0x140014cb1
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140014c81
xor al, al
jmp 0x140014cb1
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140014c93
xor al, al
jmp 0x140014cb1
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x140014caf
xor al, al
jmp 0x140014cb1
mov al, 1
add rsp, 0x38
ret
Function at 0x140398b40
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
mov eax, 0x10090
call fcn.14039d180
sub rsp, rax
mov rax, qword [0x1403e7f78]
xor rax, rsp
mov qword [rsp + 0x10080], rax
movzx edx, byte [rcx]
lea rbx, [rsp + 0x30]
xor eax, eax
mov rsi, rcx
mov word [rsp + 0x80], ax
mov word [rsp + 0x30], ax
lea edi, [rax + 0x28]
test dl, dl
je 0x140398c02
nop dword [rax + rax]
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x140398bad
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x140398ba0
cmp rcx, 1
jb 0x140398c5a
mov byte [rsp + 0x20], dl
mov rcx, 0xffffffffffffffff
mov byte [rsp + 0x21], 0
nop word [rax + rax]
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x140398bd0
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.1403abe84
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x140398b90
mov r8d, 0x10000
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0xffff
ja 0x140398c33
lea rcx, [rsp + 0x80]
call fcn.1403aecbc
jmp 0x140398c35
xor eax, eax
mov rcx, qword [rsp + 0x10080]
xor rcx, rsp
call fcn.14039ceb0
lea r11, [rsp + 0x10090]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
call fcn.1403a1068
int3
Function at 0x14039ca00
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x1403e7f78]
xor rax, rsp
mov qword [rsp + 0x80], rax
xor eax, eax
lea rbx, [rsp + 0x30]
mov rbp, rdx
mov word [rsp + 0x30], ax
movzx edx, byte [rcx]
mov rsi, rcx
lea edi, [rax + 0x28]
test dl, dl
je 0x14039caa5
nop dword [rax]
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14039ca5d
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14039ca50
cmp rcx, 1
jb 0x14039cad6
mov byte [rsp + 0x20], dl
mov rcx, 0xffffffffffffffff
mov byte [rsp + 0x21], 0
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x14039ca73
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.1403abe84
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14039ca40
mov rdx, rbp
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14039ceb0
mov rbx, qword [rsp + 0xc0]
add rsp, 0x90
pop rdi
pop rsi
pop rbp
ret
call fcn.1403a1068
int3
Function at 0x14039cb80
Capabilities:
Set environment variable

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0xb0
mov rax, qword [0x1403e7f78]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rax, qword [0x1404076e0]
mov rbp, r8
mov rsi, rdx
mov r14, rcx
test rax, rax
jne 0x14039cbd0
lea rcx, [0x1403bda74]
call qword [sym.imp.python38.dll_PyImport_ImportModule]
mov qword [0x1404076e0], rax
test rax, rax
je 0x14039ce0a
mov qword [rsp + 0xa8], rbx
lea rdx, str.environ
mov qword [rsp + 0xa0], rdi
mov rcx, rax
mov qword [rsp + 0x98], r13
mov qword [rsp + 0x90], r15
call qword [sym.imp.python38.dll_PyObject_GetAttrString]
mov rcx, rsi
mov r15, rax
call qword [sym.imp.python38.dll_PyUnicode_FromString]
movzx edx, byte [rsi]
lea rbx, [rsp + 0x30]
xor ecx, ecx
mov r13, rax
mov word [rsp + 0x30], cx
lea edi, [rcx + 0x28]
test rbp, rbp
je 0x14039cd06
test dl, dl
je 0x14039cca2
nop
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14039cc4d
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14039cc40
cmp rcx, 1
jb 0x14039ce10
mov byte [rsp + 0x20], dl
mov rcx, 0xffffffffffffffff
mov byte [rsp + 0x21], 0
nop word [rax + rax]
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x14039cc70
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.1403abe84
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14039cc30
mov rdx, rbp
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, 0xffffffffffffffff
mov rcx, rbp
call qword [sym.imp.python38.dll_PyUnicode_FromWideChar]
mov rdx, r13
mov rcx, r15
mov r8, rax
mov rbx, rax
call qword [sym.imp.python38.dll_PyObject_SetItem]
test eax, eax
je 0x14039cced
mov ecx, 1
call qword [sym.imp.python38.dll_PyErr_PrintEx]
mov ecx, 1
call qword [sym.imp.python38.dll_Py_Exit]
int3
sub qword [rbx], 1
jne 0x14039cda7
mov rax, qword [rbx + 8]
mov rcx, rbx
call qword [rax + 0x30]
jmp 0x14039cda7
test dl, dl
je 0x14039cd82
nop word [rax + rax]
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14039cd2d
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14039cd20
cmp rcx, 1
jb 0x14039ce04
mov byte [rsp + 0x20], dl
mov rcx, 0xffffffffffffffff
mov byte [rsp + 0x21], 0
nop word [rax + rax]
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x14039cd50
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.1403abe84
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14039cd10
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, r13
mov rcx, r15
call qword [sym.imp.python38.dll_PyObject_DelItem]
test eax, eax
je 0x14039cda7
mov rcx, r14
call fcn.1400be980
sub qword [r13], 1
jne 0x14039cdb8
mov rax, qword [r13 + 8]
mov rcx, r13
call qword [rax + 0x30]
sub qword [r15], 1
jne 0x14039cdc8
mov rax, qword [r15 + 8]
mov rcx, r15
call qword [rax + 0x30]
mov r13, qword [rsp + 0x98]
mov rdi, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0xa8]
mov r15, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14039ceb0
add rsp, 0xb0
pop r14
pop rsi
pop rbp
ret
call fcn.1403a1068
int3
call fcn.1403a1068
int3
call fcn.1403a1068
int3
Function at 0x14039d8f8
Capabilities:
Parse pe header

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

Function at 0x1403a24c0
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 0x1403a232b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1403a232b
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1403a232b
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1403a232b
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1403a232b
cmp dword [rcx + 0x84], 0xe
jbe 0x1403a232b
cmp dword [rcx + 0xf8], 0
je 0x1403a232b
mov ecx, ebx
call fcn.1403a23dc
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.1403a21b8
nop
cmp dword [rbp + 0x20], 0
je 0x1403a2379
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.1403a2384
int3
xor r8d, r8d
xor edx, edx
jmp 0x1403a22bc
Function at 0x1403b3df0
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 0x1403b3e77
mov rsi, rbx
cmp word [rax], bp
je 0x1403b3e36
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1403b3e20
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x1403b3e1c
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1403af4a8
mov rdi, rax
test rax, rax
je 0x1403b3e64
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14039dca0
mov rbp, rdi
xor ecx, ecx
call fcn.1403afeb8
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 0x1403b79ec
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1403b7a02
mov al, 1
jmp 0x1403b7a62
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1403b7a13
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1403b7a60
mov ecx, dword [rcx + 0x18]
nop
call fcn.1403b4594
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1403b7a60
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1403b7a60
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1403b7a60
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1403b7a62
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x14000f790
Capabilities:
Enumerate pe sections
Parse pe header
Read file via mapping

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x170
mov rax, qword [0x140099080]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov r15, rcx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov r14, rax
test rax, rax
je 0x14000f892
mov r12d, 0x5a4d
cmp word [rax], r12w
jne 0x14000f892
movsxd rdi, dword [rax + 0x3c]
add rdi, rax
cmp dword [rdi], 0x4550
jne 0x14000f892
movzx ebx, word [rdi + 0x14]
add rbx, 0x18
mov dword [rsp + 0x40], 0x104
add rbx, rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r9, [rsp + 0x40]
xor edx, edx
mov rcx, rax
lea r8, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_QueryFullProcessImageNameA]
xor esi, esi
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x30], rsi
mov r13d, 1
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov r8d, r13d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x14000f892
mov qword [rsp + 0x28], rsi
lea r8d, [rsi + 2]
xor r9d, r9d
mov dword [rsp + 0x20], esi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
test rax, rax
jne 0x14000f8c5
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.140077f60
lea r11, [rsp + 0x170]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
xor r9d, r9d
mov qword [rsp + 0x20], rsi
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r9, rax
test rax, rax
je 0x14000f892
cmp word [rax], r12w
jne 0x14000f9d6
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000f9d6
mov eax, dword [rdi + 8]
cmp dword [rcx + 8], eax
jne 0x14000f9d6
movzx edx, word [rcx + 6]
cmp dx, word [rdi + 6]
jne 0x14000f9d6
movzx r10d, word [rcx + 0x14]
xor dil, dil
add r10, 0x18
mov r11d, edx
add r10, rcx
test edx, edx
je 0x14000f9bb
nop word [rax + rax]
mov r8, r15
mov rax, rbx
sub r8, rbx
nop dword [rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x14000f963
inc rax
test ecx, ecx
jne 0x14000f950
test edx, edx
jne 0x14000f970
test dword [rbx + 0x24], 0x20000000
jne 0x14000f981
inc esi
add rbx, 0x28
add r10, 0x28
cmp esi, r11d
jl 0x14000f940
jmp 0x14000f9bb
mov eax, dword [rbx + 0x10]
test eax, eax
je 0x14000f9bb
mov r8d, dword [r10 + 0x14]
mov r10d, eax
mov edx, dword [rbx + 0xc]
add rdx, r14
add r8, r9
nop dword [rax + rax]
movzx eax, byte [r8]
lea r8, [r8 + 1]
cmp byte [rdx], al
lea rdx, [rdx + 1]
movzx edi, dil
cmovne edi, r13d
sub r10, r13
jne 0x14000f9a0
mov rcx, r9
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, dil
jmp 0x14000f894
mov rcx, r9
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, r13b
jmp 0x14000f894