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

Disassembly:
push rbx
push rbp
push r12
push r13
push r15
sub rsp, 0x180
mov rax, qword [0x140079688]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov qword [rsp + 0x50], rcx
mov r15, r8
mov rcx, rdx
mov r12, rdx
xor ebp, ebp
xor ebx, ebx
call case.0x140018d21.1
mov r13, rax
test rax, rax
jne 0x1400541be
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.140007570
mov r9, rax
lea rdx, str.schannel:_invalid_path_name_for_CA_file__s:__s
mov r8, r12
mov rcx, r15
call fcn.14001cb40
xor ecx, ecx
lea ebx, [rbp + 0x4d]
call qword [fcn.14005ed4a]
jmp 0x140054378
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov rcx, r13
mov qword [rsp + 0x170], r14
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x140054231
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.140007570
mov r9, rax
lea rdx, str.schannel:_failed_to_open_CA_file__s:__s
mov r8, r12
mov rcx, r15
call fcn.14001cb40
xor ecx, ecx
lea ebx, [r14 + 0x4e]
jmp 0x140054362
lea rdx, [rsp + 0x48]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x14005427a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.140007570
mov r9, rax
lea rdx, str.schannel:_failed_to_determine_size_of_CA_file__s:__s
mov r8, r12
mov rcx, r15
call fcn.14001cb40
mov ebx, Ordinal_79
jmp 0x140054356
mov qword [rsp + 0x178], rdi
mov rdi, qword [rsp + 0x48]
cmp rdi, 0x100000
jle 0x1400542af
mov r8d, 0x100000
lea rdx, str.schannel:_CA_file_exceeds_max_size_of__u_bytes
mov rcx, r15
call fcn.14001cb40
mov ebx, Ordinal_79
jmp 0x14005434e
lea rcx, [rdi + 1]
call qword [section..data]
mov rbp, rax
test rax, rax
jne 0x1400542c9
lea ebx, [rax + 0x1b]
jmp 0x14005434e
mov qword [rsp + 0x1c8], rsi
test rdi, rdi
je 0x140054328
nop word [rax + rax]
mov r8d, edi
mov dword [rsp + 0x40], 0
sub r8d, ebx
mov esi, ebx
lea rdx, [rbx + rbp]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14005439a
mov eax, dword [rsp + 0x40]
test eax, eax
jne 0x14005431f
mov edi, esi
jmp 0x140054321
add ebx, eax
mov eax, ebx
cmp rax, rdi
jb 0x1400542e0
mov rcx, qword [rsp + 0x50]
mov r9, r12
mov r8, rdi
mov byte [rdi + rbp], 0
mov rdx, rbp
mov qword [rsp + 0x20], r15
call fcn.140053ec0
mov ebx, eax
mov rsi, qword [rsp + 0x1c8]
mov rdi, qword [rsp + 0x178]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call qword [fcn.14005ed4a]
mov rcx, r13
call fcn.14005ed4a
mov r14, qword [rsp + 0x170]
mov eax, ebx
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.14005de40
add rsp, 0x180
pop r15
pop r13
pop r12
pop rbp
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.140007570
mov r9, rax
lea rdx, str.schannel:_failed_to_read_from_CA_file__s:__s
mov r8, r12
mov rcx, r15
call fcn.14001cb40
mov ebx, Ordinal_79
jmp 0x140054346
Function at 0x14005b040
Capabilities:
Check http status code

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x30
mov r14, r8
mov rsi, rdx
mov r8d, reloc.WS2_32.dll_recvfrom
lea rdx, str.WWW_Authenticate:
mov rcx, r9
mov rbx, r9
call fcn.14000b1e0
test eax, eax
je 0x14005b08a
mov ebp, dword [rsi + 0x150]
cmp ebp, 0x191
je 0x14005b0b1
mov r8d, reloc.WS2_32.dll_send
lea rdx, str.Proxy_authenticate:
mov rcx, rbx
call fcn.14000b1e0
test eax, eax
je 0x14005b0f7
mov ebp, dword [rsi + 0x150]
cmp ebp, 0x197
jne 0x14005b0f7
mov rcx, rbx
call fcn.140026cf0
mov rbx, rax
test rax, rax
jne 0x14005b0c9
lea eax, [rbx + 0x1b]
jmp 0x14005b2ba
cmp ebp, 0x197
mov r8, rbx
mov rcx, rsi
sete dl
call fcn.140028990
mov rcx, rbx
mov edi, eax
call qword [fcn.14005ed4a]
test edi, edi
je 0x14005b2b8
mov eax, edi
jmp 0x14005b2ba
mov r8d, reloc.WS2_32.dll_ntohs
lea rdx, str.Content_Length:
mov rcx, rbx
call fcn.14000b1e0
test eax, eax
je 0x14005b152
mov r8d, dword [rsi + 0x150]
lea eax, [r8 - 0xc8]
cmp eax, 0x64
jae 0x14005b137
lea rdx, str.Ignoring_Content_Length_in_CONNECT__03d_response
mov rcx, rsi
call fcn.14001cc20
jmp 0x14005b2b8
xor edx, edx
lea r9, [r14 + 0x2a8]
lea rcx, [rbx + 0xf]
lea r8d, [rdx + 0xa]
call fcn.14002d230
jmp 0x14005b2b8
lea r9, str.close
mov qword [rsp + 0x20], 5
mov r8d, listen
lea rdx, str.Connection:
mov rcx, rbx
call fcn.140026c20
test al, al
jne 0x14005b2b0
mov r8d, reloc.WS2_32.dll_select
lea rdx, str.Transfer_Encoding:
mov rcx, rbx
call fcn.14000b1e0
test eax, eax
je 0x14005b210
mov r8d, dword [rsi + 0x150]
lea eax, [r8 - 0xc8]
cmp eax, 0x64
jae 0x14005b1bf
lea rdx, str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response
mov rcx, rsi
call fcn.14001cc20
jmp 0x14005b2b8
lea r9, str.chunked
mov qword [rsp + 0x20], 7
mov r8d, reloc.WS2_32.dll_select
lea rdx, str.Transfer_Encoding:
mov rcx, rbx
call fcn.140026c20
test al, al
je 0x14005b2b8
lea rdx, str.CONNECT_responded_chunked
mov rcx, rsi
call fcn.14001cc20
mov rcx, rsi
mov byte [r14 + 0x2b4], 1
call fcn.14004ef20
jmp 0x14005b2b8
lea r9, str.close
mov qword [rsp + 0x20], 5
mov r8d, reloc.WS2_32.dll_recvfrom
lea rdx, str.Proxy_Connection:
mov rcx, rbx
call fcn.140026c20
test al, al
jne 0x14005b2b0
mov r8d, 7
lea rdx, str.HTTP_1.
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
jne 0x14005b2b8
movzx eax, byte [rbx + 7]
sub al, 0x30
cmp al, 1
ja 0x14005b2b8
cmp byte [rbx + 8], 0x20
jne 0x14005b2b8
movsx ecx, byte [rbx + 9]
lea eax, [rcx - 0x30]
cmp al, 9
ja 0x14005b2b8
movsx edx, byte [rbx + 0xa]
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x14005b2b8
movsx r8d, byte [rbx + 0xb]
lea eax, [r8 - 0x30]
cmp al, 9
ja 0x14005b2b8
movzx eax, byte [rbx + 0xc]
sub al, 0x30
cmp al, 9
jbe 0x14005b2b8
lea ecx, [rcx + rcx*4]
lea ecx, [rdx + rcx*2]
lea ecx, [rcx + rcx*4]
lea ecx, [rcx - 0xa68]
lea ecx, [r8 + rcx*2]
mov dword [rsi + 0x150], ecx
mov dword [rsi + 0x1384], ecx
jmp 0x14005b2b8
mov byte [r14 + 0x2b5], 1
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x30
pop r14
ret
Function at 0x14005c9d0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push r14
push r15
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbp, rcx
mov ecx, dword [rcx + 0x20]
mov r14, rdx
add rcx, 0x18
mov r15d, r8d
lea r9d, [rax + rax]
add rcx, r9
call qword [section..data]
mov rbx, rax
test rax, rax
jne 0x14005ca15
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbp
mov qword [rax + 8], rcx
mov eax, dword [rbp + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rsi
mov qword [rbx + 0x10], rax
mov qword [rsp + 0x50], rdi
cmp r15d, dword [rbp + 0x1c]
jbe 0x14005ca60
call qword [rbp]
mov rcx, qword [rbx + 8]
mov r8d, r15d
mov rdx, r14
call qword [rbp + reloc.WS2_32.dll_htonl]
mov r14d, dword [rbp + 0x18]
add r14, qword [rbx + 0x10]
mov rdx, qword [rbx + 8]
mov rcx, r14
call qword [rbp + reloc.WS2_32.dll_recv]
mov r15d, dword [rbp + 0x20]
mov rcx, qword [rbx + 8]
call qword [rbp]
mov rcx, qword [rbx + 0x10]
call qword [rbp]
xor esi, esi
test r15, r15
je 0x14005cac2
mov rsi, r15
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rbx + 8]
call qword [rbp + reloc.WS2_32.dll_htonl]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rbx + 0x10]
call qword [rbp + reloc.WS2_32.dll_htonl]
sub r15, 1
jne 0x14005ca80
mov eax, dword [rbp + 0x1c]
cmp rsi, rax
jae 0x14005cb03
nop word [rax + rax]
mov rcx, qword [rbx + 8]
lea rdx, [0x14006f201]
mov r8d, 1
call qword [rbp + reloc.WS2_32.dll_htonl]
mov rcx, qword [rbx + 0x10]
lea rdx, [0x14006f202]
mov r8d, 1
call qword [rbp + reloc.WS2_32.dll_htonl]
mov eax, dword [rbp + 0x1c]
inc rsi
cmp rsi, rax
jb 0x14005cad0
mov rdi, qword [rsp + 0x50]
mov rax, rbx
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop r14
pop rbp
ret
Function at 0x14005cb20
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push rbx
push rbp
push r12
push r14
push r15
sub rsp, 0x20
mov rbp, rcx
mov r12, r9
mov rcx, r8
mov r14, rdx
call fcn.14000b3f0
mov r8d, dword [rbp + 0x18]
mov ecx, dword [rbp + 0x20]
add rcx, 0x18
mov r15d, eax
lea r9d, [r8 + r8]
add rcx, r9
call qword [section..data]
mov rbx, rax
test rax, rax
je 0x14005ccc6
lea rcx, [rax + 0x18]
mov qword [rax], rbp
mov qword [rax + 8], rcx
mov eax, dword [rbp + 0x18]
add rax, rcx
mov qword [rsp + 0x58], rsi
mov qword [rbx + 0x10], rax
mov qword [rsp + 0x60], rdi
cmp r15d, dword [rbp + 0x1c]
jbe 0x14005cbb0
call qword [rbp]
mov rcx, qword [rbx + 8]
mov r8d, r15d
mov rdx, r14
call qword [rbp + reloc.WS2_32.dll_htonl]
mov r14d, dword [rbp + 0x18]
add r14, qword [rbx + 0x10]
mov rdx, qword [rbx + 8]
mov rcx, r14
call qword [rbp + reloc.WS2_32.dll_recv]
mov r15d, dword [rbp + 0x20]
mov rcx, qword [rbx + 8]
call qword [rbp]
mov rcx, qword [rbx + 0x10]
call qword [rbp]
xor esi, esi
test r15, r15
je 0x14005cc12
mov rsi, r15
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x50]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x50], al
mov rcx, qword [rbx + 8]
call qword [rbp + reloc.WS2_32.dll_htonl]
movzx eax, byte [r14]
lea rdx, [rsp + 0x50]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x50], al
mov r8d, 1
mov rcx, qword [rbx + 0x10]
call qword [rbp + reloc.WS2_32.dll_htonl]
sub r15, 1
jne 0x14005cbd0
mov eax, dword [rbp + 0x1c]
cmp rsi, rax
jae 0x14005cc53
nop word [rax + rax]
mov rcx, qword [rbx + 8]
lea rdx, [0x14006f201]
mov r8d, 1
call qword [rbp + reloc.WS2_32.dll_htonl]
mov rcx, qword [rbx + 0x10]
lea rdx, [0x14006f202]
mov r8d, 1
call qword [rbp + reloc.WS2_32.dll_htonl]
mov eax, dword [rbp + 0x1c]
inc rsi
cmp rsi, rax
jb 0x14005cc20
mov rcx, qword [rsp + 0x70]
call fcn.14000b3f0
mov r9, qword [rbx]
mov r8d, eax
mov rcx, qword [rbx + 8]
mov rdx, r12
call qword [r9 + reloc.WS2_32.dll_htonl]
mov rdi, qword [rsp + 0x78]
mov rsi, qword [rbx]
test rdi, rdi
jne 0x14005cc82
mov edi, dword [rsi + 0x18]
add rdi, qword [rbx + 0x10]
mov rdx, qword [rbx + 8]
mov rcx, rdi
call qword [rsi + reloc.WS2_32.dll_recv]
mov r8d, dword [rsi + 0x20]
mov rdx, rdi
mov rcx, qword [rbx + 0x10]
call qword [rsi + reloc.WS2_32.dll_htonl]
mov rdx, qword [rbx + 0x10]
mov rcx, rdi
call qword [rsi + reloc.WS2_32.dll_recv]
mov rcx, rbx
call qword [fcn.14005ed4a]
mov rdi, qword [rsp + 0x60]
xor eax, eax
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r12
pop rbp
pop rbx
ret
mov eax, reloc.WLDAP32.dll_Ordinal_27
add rsp, 0x20
pop r15
pop r14
pop r12
pop rbp
pop rbx
ret

Function at 0x14005dc50
Capabilities:
Encode data using xor

Disassembly:
mov r10, rcx
test rdx, rdx
je 0x14005dcb5
nop dword [rax + rax]
movzx r8d, byte [r10]
lea r10, [r10 + 1]
movzx eax, r8b
movzx r9d, r8b
shr r9b, 1
and al, 0xfe
not r9b
movzx eax, al
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
or r8b, 1
test r9b, 2
movzx ecx, r8b
cmove ecx, eax
mov byte [r10 - 1], cl
sub rdx, 1
jne 0x14005dc60
ret
Function at 0x14005e9cc
Capabilities:
Parse pe header

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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
mov eax, 0x10090
call fcn.14002c020
sub rsp, rax
mov rax, qword [0x14006a128]
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 0x140027d42
nop dword [rax + rax]
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x140027ced
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x140027ce0
cmp rcx, 1
jb 0x140027d9a
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 0x140027d10
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.14003b13c
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x140027cd0
mov r8d, 0x10000
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0xffff
ja 0x140027d73
lea rcx, [rsp + 0x80]
call fcn.14003df74
jmp 0x140027d75
xor eax, eax
mov rcx, qword [rsp + 0x10080]
xor rcx, rsp
call fcn.14002bd50
lea r11, [rsp + 0x10090]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
call fcn.14003aee8
int3
Function at 0x14002b840
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x14006a128]
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 0x14002b8e5
nop dword [rax]
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14002b89d
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14002b890
cmp rcx, 1
jb 0x14002b916
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 0x14002b8b3
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.14003b13c
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14002b880
mov rdx, rbp
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14002bd50
mov rbx, qword [rsp + 0xc0]
add rsp, 0x90
pop rdi
pop rsi
pop rbp
ret
call fcn.14003aee8
int3
Function at 0x14002ba20
Capabilities:
Set environment variable

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0xb0
mov rax, qword [0x14006a128]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rax, qword [0x14006c098]
mov rbp, r8
mov rsi, rdx
mov r14, rcx
test rax, rax
jne 0x14002ba70
lea rcx, [0x14004c05c]
call qword [sym.imp.python311.dll_PyImport_ImportModule]
mov qword [0x14006c098], rax
test rax, rax
je 0x14002bcaa
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.python311.dll_PyObject_GetAttrString]
mov rcx, rsi
mov r15, rax
call qword [sym.imp.python311.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 0x14002bba6
test dl, dl
je 0x14002bb42
nop
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14002baed
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14002bae0
cmp rcx, 1
jb 0x14002bcb0
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 0x14002bb10
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.14003b13c
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14002bad0
mov rdx, rbp
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, 0xffffffffffffffff
mov rcx, rbp
call qword [sym.imp.python311.dll_PyUnicode_FromWideChar]
mov rdx, r13
mov rcx, r15
mov r8, rax
mov rbx, rax
call qword [sym.imp.python311.dll_PyObject_SetItem]
test eax, eax
je 0x14002bb8d
mov ecx, 1
call qword [sym.imp.python311.dll_PyErr_PrintEx]
mov ecx, 1
call qword [sym.imp.python311.dll_Py_Exit]
int3
sub qword [rbx], 1
jne 0x14002bc47
mov rax, qword [rbx + 8]
mov rcx, rbx
call qword [rax + 0x30]
jmp 0x14002bc47
test dl, dl
je 0x14002bc22
nop word [rax + rax]
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14002bbcd
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14002bbc0
cmp rcx, 1
jb 0x14002bca4
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 0x14002bbf0
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.14003b13c
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14002bbb0
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, r13
mov rcx, r15
call qword [sym.imp.python311.dll_PyObject_DelItem]
test eax, eax
je 0x14002bc47
mov rcx, r14
call fcn.1400167f0
sub qword [r13], 1
jne 0x14002bc58
mov rax, qword [r13 + 8]
mov rcx, r13
call qword [rax + 0x30]
sub qword [r15], 1
jne 0x14002bc68
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.14002bd50
add rsp, 0xb0
pop r14
pop rsi
pop rbp
ret
call fcn.14003aee8
int3
call fcn.14003aee8
int3
call fcn.14003aee8
int3
Function at 0x14002c798
Capabilities:
Parse pe header

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

Function at 0x140031728
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 0x140031593
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140031593
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140031593
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140031593
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140031593
cmp dword [rcx + 0x84], 0xe
jbe 0x140031593
cmp dword [rcx + 0xf8], 0
je 0x140031593
mov ecx, ebx
call fcn.140031644
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.140031420
nop
cmp dword [rbp + 0x20], 0
je 0x1400315e1
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.1400315ec
int3
xor r8d, r8d
xor edx, edx
jmp 0x140031524
Function at 0x1400431e0
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 0x140043267
mov rsi, rbx
cmp word [rax], bp
je 0x140043226
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140043210
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14004320c
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14003e060
mov rdi, rax
test rax, rax
je 0x140043254
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14002cb40
mov rbp, rdi
xor ecx, ecx
call fcn.14003ef94
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 0x140046ddc
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140046df2
mov al, 1
jmp 0x140046e52
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140046e03
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140046e50
mov ecx, dword [rcx + 0x18]
nop
call fcn.140043984
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140046e50
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140046e50
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140046e50
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140046e52
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x4039d9
Capabilities:
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov edx, 0x8000
mov rcx, qword [rbp + 0x10]
call sub.msvcrt.dll__open
mov dword [rbp - 0xc], eax
cmp dword [rbp - 0xc], 0
jns 0x403a0e
mov eax, 0
jmp 0x403aac
mov rdx, qword [rbp + 0x20]
mov eax, dword [rbp - 0xc]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__fstat64]
call rax
test eax, eax
jns 0x403a35
mov eax, dword [rbp - 0xc]
mov ecx, eax
call sub.msvcrt.dll__close
mov eax, 0
jmp 0x403aac
mov rax, qword [rbp + 0x20]
mov rax, qword [rax + 0x18]
mov rdx, rax
mov rax, qword [rbp + 0x18]
mov qword [rax], rdx
mov rax, qword [rbp + 0x18]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_malloc
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x403a8a
mov rax, qword [rbp + 0x18]
mov rax, qword [rax]
mov ecx, eax
mov rdx, qword [rbp - 8]
mov eax, dword [rbp - 0xc]
mov r8d, ecx
mov ecx, eax
call sub.msvcrt.dll__read
movsxd rdx, eax
mov rax, qword [rbp + 0x18]
mov rax, qword [rax]
cmp rdx, rax
je 0x403a9e
mov rax, qword [rbp - 8]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 8], 0
mov eax, dword [rbp - 0xc]
mov ecx, eax
call sub.msvcrt.dll__close
mov rax, qword [rbp - 8]
add rsp, 0x30
pop rbp
ret

Function at 0x403e2f
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
sub dword [rbp + 0x18], 1
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x30]
cmp dword [rbp + 0x18], eax
jae 0x403ebd
mov rax, qword [rbp + 0x10]
mov rax, qword [rax + 0x28]
mov edx, dword [rbp + 0x18]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
lea rdx, [0x00530700]
mov rcx, rax
call sub.msvcrt.dll_strcspn
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x403eb1
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
lea rcx, [rax + 0x30]
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 8]
mov r9, rcx
mov r8d, 1
mov rcx, rax
call main
cmp rax, 1
jne 0x403ebe
mov ecx, 0xa
call sub.msvcrt.dll_putchar
jmp 0x403ebe
nop
add rsp, 0x30
pop rbp
ret