joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18001e110
Capabilities:
Enumerate files on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov ecx, 0x8000
call fcn.1800278a4
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x40]
lea r8, str._s
mov edx, 0x8000
mov rcx, qword [rsp + 0x20]
call fcn.18000f304
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x20]
call fcn.180027890
cmp qword [rsp + 0x28], 0xffffffffffffffff
jne 0x18001e179
jmp 0x18001e297
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
and eax, 0x10
test eax, eax
je 0x18001e25c
mov rax, qword [rsp + 0x48]
add rax, 0x2c
lea rcx, [0x18005266c]
sub rcx, rax
mov dl, byte [rax]
cmp dl, byte [rax + rcx]
jne 0x18001e1b0
inc rax
test dl, dl
jne 0x18001e19e
xor eax, eax
jmp 0x18001e1b5
sbb eax, eax
or eax, 1
test eax, eax
je 0x18001e25a
mov rax, qword [rsp + 0x48]
add rax, 0x2c
lea rcx, [0x180052670]
sub rcx, rax
mov dl, byte [rax]
cmp dl, byte [rax + rcx]
jne 0x18001e1e2
inc rax
test dl, dl
jne 0x18001e1d0
xor eax, eax
jmp 0x18001e1e7
sbb eax, eax
or eax, 1
test eax, eax
je 0x18001e25a
mov ecx, 0x8000
call fcn.1800278a4
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x48]
add rax, 0x2c
mov r9, rax
lea r8, [0x180052674]
mov edx, 0x8000
mov rcx, qword [rsp + 0x20]
call fcn.18000f304
mov rax, qword [rsp + 0x48]
add rax, 0x2c
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x48]
mov rdx, rax
mov rcx, qword [rsp + 0x40]
call fcn.18001e29c
mov r8d, 1
mov rdx, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
call qword [rsp + 0x50]
mov rcx, qword [rsp + 0x20]
call fcn.180027890
jmp 0x18001e274
mov rax, qword [rsp + 0x48]
add rax, 0x2c
xor r8d, r8d
mov rdx, rax
mov rcx, qword [rsp + 0x40]
call qword [rsp + 0x50]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x18001e179
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_FindClose]
add rsp, 0x38
ret
Function at 0x1800223f4
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov qword [rsp + 0x38], 0xffffffffffffffff
mov r9d, 4
mov r8d, 0x3000
mov edx, 0x18
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x50]
mov qword [rax], rcx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x58]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x30]
mov rcx, qword [sym.imp.KERNEL32.dll_VirtualFree]
mov qword [rax + 0x10], rcx
call fcn.1800225ac
cmp qword [0x1800597f8], 0
je 0x18002248f
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9, qword [rsp + 0x30]
mov r8, qword [0x1800597f8]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
add rsp, 0x48
ret

Function at 0x18002249c
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov eax, dword [0x1800597f0]
inc eax
mov dword [0x1800597f0], eax
mov ecx, 0x27
call fcn.180021380
movzx eax, ax
cmp eax, 1
jne 0x1800224dd
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call fcn.1800223f4
jmp 0x180022502
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9, qword [rsp + 0x48]
mov r8, qword [rsp + 0x40]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
add rsp, 0x38
ret

Function at 0x180022508
Capabilities:
Create thread
Terminate process

Disassembly:
sub rsp, 0x48
mov ecx, 0x37
call fcn.180021380
movzx eax, ax
mov dword [rsp + 0x34], eax
mov ecx, 0x27
call fcn.180021380
movzx eax, ax
mov dword [rsp + 0x30], eax
call fcn.1800230f0
cmp dword [rsp + 0x34], 1
jne 0x180022561
cmp dword [rsp + 0x30], 1
jne 0x180022557
xor eax, eax
cmp eax, 1
je 0x180022555
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x180022541
jmp 0x18002255f
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitThread]
jmp 0x1800225a5
cmp dword [rsp + 0x30], 1
jne 0x18002259d
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8, qword [sym.imp.KERNEL32.dll_ExitProcess]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x1800225a5
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
add rsp, 0x48
ret
Function at 0x1800229f8
Capabilities:
Get token membership

Disassembly:
sub rsp, 0x88
mov byte [rsp + 0x64], 0
mov byte [rsp + 0x65], 0
mov byte [rsp + 0x66], 0
mov byte [rsp + 0x67], 0
mov byte [rsp + 0x68], 0
mov byte [rsp + 0x69], 5
lea rax, [rsp + 0x70]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0x220
mov r8d, 0x20
mov dl, 2
lea rcx, [rsp + 0x64]
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
je 0x180022aa4
lea r8, [rsp + 0x60]
mov rdx, qword [rsp + 0x70]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x180022a99
mov dword [rsp + 0x60], 0
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [rsp + 0x60]
add rsp, 0x88
ret

Function at 0x180022ab0
Capabilities:
Impersonate user

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x48
call fcn.1800227a0
lea rax, [0x180059800]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 3
mov r9d, 9
mov r8, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_LogonUserA]
test eax, eax
jne 0x180022b17
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, 0x18
call fcn.180010e8c
jmp 0x180022c40
mov rcx, qword [0x180059800]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x180022b3f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, 0x19
call fcn.180010e8c
jmp 0x180022c40
mov ecx, 0x800
call fcn.180019ab4
mov qword [0x180059820], rax
mov edx, 0x200
mov rcx, qword [0x180059820]
call fcn.180019d08
mov qword [0x180059808], rax
mov edx, 0x200
mov rcx, qword [0x180059820]
call fcn.180019d08
mov qword [0x180059810], rax
mov edx, 0x400
mov rcx, qword [0x180059820]
call fcn.180019d08
mov qword [0x180059818], rax
mov r8d, 0x100
mov rdx, qword [0x180059810]
mov rcx, qword [rsp + 0x58]
call fcn.180012a94
mov r8d, 0x100
mov rdx, qword [0x180059808]
mov rcx, qword [rsp + 0x50]
call fcn.180012a94
mov r8d, 0x200
mov rdx, qword [0x180059818]
mov rcx, qword [rsp + 0x60]
call fcn.180012a94
mov dword [0x180059828], 1
mov r8d, 0x400
mov rdx, qword [rsp + 0x58]
mov rcx, qword [0x180059800]
call fcn.180022d84
test eax, eax
je 0x180022c40
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0xffffffffffffffff
inc qword [rsp + 0x30]
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
cmp byte [rax + rcx], 0
jne 0x180022c15
mov rax, qword [rsp + 0x30]
mov r8d, reloc.WS2_32.dll_ntohs
mov edx, eax
mov rcx, qword [rsp + 0x58]
call qword [rsp + 0x68]
add rsp, 0x48
ret
Function at 0x180023474
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov dword [rsp + 0x20], 0
mov dword [rsp + 0x24], 0
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0x20], eax
jae 0x18002353e
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
xor r9d, r9d
mov r8d, 1
mov rdx, rax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_recv]
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
jg 0x1800234dd
mov eax, 0xffffffff
jmp 0x180023543
mov eax, dword [rsp + 0x24]
mov ecx, dword [rsp + 0x20]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 2
jb 0x180023539
mov eax, dword [rsp + 0x20]
dec eax
mov eax, eax
mov rcx, qword [rsp + 0x48]
movsx eax, byte [rcx + rax]
cmp eax, 0xa
jne 0x180023539
mov eax, dword [rsp + 0x20]
sub eax, 2
mov eax, eax
mov rcx, qword [rsp + 0x48]
movsx eax, byte [rcx + rax]
cmp eax, 0xd
jne 0x180023539
mov eax, dword [rsp + 0x20]
sub eax, 2
mov eax, eax
mov rcx, qword [rsp + 0x48]
mov byte [rcx + rax], 0
mov eax, dword [rsp + 0x20]
jmp 0x180023543
jmp 0x180023497
mov eax, 0xffffffff
add rsp, 0x38
ret

Function at 0x180023548
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov word [rsp + 8], cx
sub rsp, 0x58
mov qword [rsp + 0x28], 0xffffffffffffffff
mov dword [rsp + 0x20], 0
call fcn.180011d4c
xor r8d, r8d
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0xffffffffffffffff
jne 0x1800235a1
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x180023643
mov eax, 2
mov word [rsp + 0x38], ax
movzx ecx, word [rsp + 0x60]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x3a], ax
mov dword [rsp + 0x3c], 0x100007f
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_bind]
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0xffffffff
jne 0x1800235f1
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x180023643
mov edx, 0x78
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_listen]
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0xffffffff
jne 0x180023619
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x180023643
mov r8d, dword [rsp + 0x70]
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x28]
call fcn.180023730
mov qword [rsp + 0x30], rax
mov rdx, qword [rsp + 0x30]
lea rcx, [0x180023648]
call fcn.18002249c
add rsp, 0x58
ret
Function at 0x18002a55c
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 0x18002a40f
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x18002a40f
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x18002a40f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x18002a40f
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x18002a40f
cmp dword [rcx + 0x84], 0xe
jbe 0x18002a40f
cmp dword [rcx + 0xf8], 0
je 0x18002a40f
mov ecx, ebx
call fcn.18002a4c0
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.18002a29c
nop
cmp dword [rbp + 0x20], 0
je 0x18002a45d
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.18002a468
int3
xor r8d, r8d
xor edx, edx
jmp 0x18002a3a0

Function at 0x18002b7f0
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.1800238b0
sub rsp, rax
mov rax, qword [0x1800537c0]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.18002f08c
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x18002b83f
mov rax, rbp
jmp 0x18002b947
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, [0x180000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x59c20]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.180032818
mov r13, rax
lea rax, [0x180000000]
mov rcx, qword [rax + rbx*8 + 0x59c20]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x18002b943
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 0x18002b943
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.180032818
test rax, rax
js 0x18002b943
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x18002b943
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x18002b935
lea r8, [0x180000000]
cmp rcx, rdx
jae 0x18002b935
cmp byte [rcx], 0xd
jne 0x18002b91b
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x18002b92a
cmp byte [rcx + 1], 0xa
jne 0x18002b92a
inc rcx
jmp 0x18002b92a
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x53ae0]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x18002b8fd
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x18002b947
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.18003c720
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 0x18002be00
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
mov rbp, rsp
sub rsp, 0x70
mov rbx, rcx
test rcx, rcx
jne 0x18002be1f
call fcn.180032f04
jmp 0x18002bed4
and qword [rbp - 0x30], 0
lea rcx, [rbp - 0x50]
and qword [rbp - 0x28], 0
xor edx, edx
and qword [rbp - 0x20], 0
and qword [rbp - 0x18], 0
and qword [rbp - 0x10], 0
mov byte [rbp - 8], 0
call fcn.18002bbec
mov rax, qword [rbp - 0x48]
mov r9d, 0xfde9
cmp dword [rax + 0xc], r9d
jne 0x18002be6a
cmp byte [rbp - 0x38], 0
je 0x18002be9f
mov rax, qword [rbp - 0x50]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x18002be9f
call fcn.180032b68
test eax, eax
jne 0x18002be8b
cmp byte [rbp - 0x38], al
je 0x18002be83
mov rax, qword [rbp - 0x50]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x18002be9f
cmp byte [rbp - 0x38], 0
je 0x18002be9c
mov rax, qword [rbp - 0x50]
and dword [rax + 0x3a8], 0xfffffffd
xor r9d, r9d
lea r8, [rbp + 0x10]
mov rcx, rbx
lea rdx, [rbp - 0x30]
call fcn.18002ba70
test eax, eax
je 0x18002beb8
or ebx, 0xffffffff
jmp 0x18002bec3
mov rcx, qword [rbp - 0x20]
call fcn.180032f04
mov ebx, eax
cmp byte [rbp - 8], 0
je 0x18002bed2
mov rcx, qword [rbp - 0x20]
call fcn.18002d5ec
mov eax, ebx
mov rbx, qword [rsp + 0x88]
add rsp, 0x70
pop rbp
ret
Function at 0x180031908
Capabilities:
Get file size

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

Function at 0x180031a50
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, [0x180059c20]
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 0x180031aa7
cmp word [rdx], r13w
jne 0x180031aa7
or byte [rax + rdi*8 + 0x38], cl
jmp 0x180031aac
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x180031bd1
mov r11d, reloc.WS2_32.dll_listen
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x180031bf2
lea r9, [rdx + 2]
cmp cx, r11w
je 0x180031ae5
mov rdx, r9
mov word [rbx], cx
jmp 0x180031b0c
cmp r9, r8
jae 0x180031b1c
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 0x180031ac6
jmp 0x180031bd1
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 0x180031bc6
cmp dword [rsp + 0x80], esi
je 0x180031bc6
lea r8, [0x180059c20]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x180031b9e
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x180031b6e
mov word [rbx], r13w
jmp 0x180031bce
mov ecx, reloc.WS2_32.dll_listen
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 0x180031b7b
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x180031bce
cmp word [rsp + 0x70], r13w
jne 0x180031bab
cmp rbx, r14
je 0x180031b68
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.180032820
cmp word [rsp + 0x70], r13w
je 0x180031bd1
mov ecx, reloc.WS2_32.dll_listen
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, [0x180059c20]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x180031bcb
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x180031bd1
Function at 0x180032edc
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x180032efc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.18002dabc
or eax, 0xffffffff
jmp 0x180032efe
xor eax, eax
add rsp, 0x28
ret

Function at 0x180032f30
Capabilities:
Delete directory

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x180032f50
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.18002dabc
or eax, 0xffffffff
jmp 0x180032f52
xor eax, eax
add rsp, 0x28
ret
Function at 0x1800349a0
Capabilities:
Query environment variable

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, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x1800349d0
xor eax, eax
jmp 0x180034a93
mov rbp, rbx
cmp word [rax], si
je 0x1800349f5
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1800349dc
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1800349d8
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.1800348c0
movsxd r14, eax
test eax, eax
jne 0x180034a33
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1800349c9
mov rcx, r14
call fcn.18002d628
mov rdi, rax
test rax, rax
jne 0x180034a4c
xor ecx, ecx
call fcn.18002d5ec
jmp 0x180034a28
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.1800348c0
test eax, eax
jne 0x180034a7d
mov rcx, rdi
call fcn.18002d5ec
jmp 0x180034a87
xor ecx, ecx
call fcn.18002d5ec
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x180034ab0
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 0x180034b37
mov rsi, rbx
cmp word [rax], bp
je 0x180034af6
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x180034ae0
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x180034adc
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.18002d628
mov rdi, rax
test rax, rax
je 0x180034b24
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.180024e50
mov rbp, rdi
xor ecx, ecx
call fcn.18002d5ec
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 0x18003a3f0
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.18002bbec
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x18003a47a
cmp byte [rbp - 0x21], r15b
je 0x18003a475
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x18003a4b0
call fcn.180032b68
test eax, eax
jne 0x18003a49c
cmp byte [rbp - 0x21], r15b
je 0x18003a494
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x18003a4b0
cmp byte [rbp - 0x21], r15b
je 0x18003a4ad
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.18002ba70
test eax, eax
jne 0x18003a550
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.18002bbec
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x18003a4ef
cmp byte [rbp - 0x21], r15b
je 0x18003a524
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x18003a524
call fcn.180032b68
test eax, eax
jne 0x18003a510
cmp byte [rbp - 0x21], r15b
je 0x18003a509
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x18003a524
cmp byte [rbp - 0x21], r15b
je 0x18003a521
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.18002ba70
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x18003a550
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x18003a553
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x18003a561
mov rcx, rdi
call fcn.18002d5ec
cmp byte [rbp + 0x3f], r15b
je 0x18003a570
mov rcx, qword [rbp + 0x27]
call fcn.18002d5ec
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