joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140055ff0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.140056dc0
mov r8d, 0x1b
mov edx, 1
lea rcx, [0x1427fd760]
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.140056dc0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140056060
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x142802194]
mov rbx, rcx
test esi, esi
jle 0x140056190
mov rax, qword [0x142802198]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400560ab
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140056135
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140056090
mov rcx, rbx
call fcn.140056ae0
mov rdi, rax
test rax, rax
je 0x1400561b2
mov rax, qword [0x142802198]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140056c20
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x142802198]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140056197
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x14005612e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140056140
add dword [0x142802194], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x142802198]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14005612e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x1427fd7d8]
mov edx, eax
call fcn.140055ff0
nop dword [rax]
xor esi, esi
jmp 0x1400560b8
mov rax, qword [0x142802198]
mov edx, dword [rdi + 8]
lea rcx, [0x1427fd7a0]
mov r8, qword [rax + rbx + 0x18]
call fcn.140055ff0
mov rdx, rbx
lea rcx, [0x1427fd780]
call fcn.140055ff0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140056750
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x142802200]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1428021e0]
test rbx, rbx
je 0x1400567ac
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x1400567a3
test eax, eax
jne 0x1400567a3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140056788
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140056ae0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1427fd950]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140056b00
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140056b08
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140056b00
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x140056b5d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140056b54
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140056b00
add rax, 0x28
cmp rax, r9
jne 0x140056b40
xor eax, eax
ret

Function at 0x140056b60
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1427fd950]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x140056b7f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140056b88
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x140056b7f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140056c20
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1427fd950]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140056c3f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140056c48
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x1806f3058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1806f31df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x1806f3089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1806f306f
add dl, dl
jne 0x1806f3096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1806f30f6
xor eax, eax
add dl, dl
jne 0x1806f30a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1806f31ad
add dl, dl
jne 0x1806f30b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806f30c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806f30d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806f30dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1806f30ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1806f307e
mov eax, 1
add dl, dl
jne 0x1806f3106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806f3113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1806f30fb
sub eax, ebx
mov ebx, 1
jne 0x1806f314c
mov ecx, 1
add dl, dl
jne 0x1806f312e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1806f313b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1806f3123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1806f307e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1806f3168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1806f3175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1806f315d
cmp eax, 0x7d00
jae 0x1806f319b
cmp eax, 0x500
jb 0x1806f3196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1806f307e
cmp eax, 0x7f
ja 0x1806f319e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1806f307e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1806f31d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x1806f307e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x1400498f0]
mov dword [rax], 1
mov rax, qword [0x140049900]
mov dword [rax], 1
mov rax, qword [0x140049910]
mov dword [rax], 1
mov rax, qword [0x1400498a0]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140018130
Capabilities:
Query environment variable

Disassembly:
push r15
mov eax, 0x10088
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14002aae0
sub rsp, rax
xor edx, edx
mov rbp, rcx
xor ecx, ecx
mov word [rsp + 0x80], dx
lea r15, [rsp + 0x30]
movzx eax, byte [rbp]
mov word [rsp + 0x30], cx
test al, al
je 0x1400181f5
xor edi, edi
lea r15, [rsp + 0x30]
lea r14, [rsp + 0x2a]
mov r12d, 0x28
lea r13, [rsp + 0x2c]
nop dword [rax]
mov rsi, r12
mov r8d, 2
mov rdx, r14
mov rcx, r13
sub rsi, rdi
mov byte [rsp + 0x2a], al
lea rbx, [r15 + rdi*2]
mov byte [rsp + 0x2b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x14003b8b0
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x1400181d6
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x1400181c8
test rsi, rsi
je 0x14003b8b0
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x140018188
lea rbx, [rsp + 0x80]
mov r8d, 0x10000
mov rcx, r15
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [rax - 1]
xor eax, eax
cmp edx, 0xffff
ja 0x140018224
mov rcx, rbx
call sub.msvcrt.dll__wcsdup
add rsp, 0x10088
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x140018240
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
movzx eax, byte [rcx]
mov qword [rsp + 0xd8], rdx
xor edx, edx
mov rbp, rcx
lea r15, [rsp + 0x30]
mov word [rsp + 0x30], dx
test al, al
je 0x1400182fd
xor edi, edi
lea r15, [rsp + 0x30]
lea r14, [rsp + 0x2a]
mov r12d, 0x28
lea r13, [rsp + 0x2c]
nop dword [rax]
mov rsi, r12
mov r8d, 2
mov rdx, r14
mov rcx, r13
sub rsi, rdi
mov byte [rsp + 0x2a], al
lea rbx, [r15 + rdi*2]
mov byte [rsp + 0x2b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x14003b8b6
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x1400182de
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x1400182d0
test rsi, rsi
je 0x14003b8b6
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x140018290
mov rdx, qword [rsp + 0xd8]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140018330
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
mov rdi, qword [0x140049bb0]
mov qword [rsp + 0x38], rcx
mov rcx, qword [rdi]
mov rsi, rdx
mov rbx, r8
test rcx, rcx
je 0x1400184eb
lea rdx, str.environ
call qword [sym.imp.python38.dll_PyObject_GetAttrString]
mov rcx, rsi
mov rdi, rax
call qword [sym.imp.python38.dll_PyUnicode_FromString]
mov rbp, rax
test rbx, rbx
je 0x14001840d
mov rdx, rbx
mov rcx, rsi
call fcn.140018240
mov rcx, rbx
mov rdx, 0xffffffffffffffff
call qword [sym.imp.python38.dll_PyUnicode_FromWideChar]
mov rdx, rbp
mov rcx, rdi
mov rbx, rax
mov r8, rax
call qword [sym.imp.python38.dll_PyObject_SetItem]
test eax, eax
jne 0x14001850c
sub qword [rbx], 1
jne 0x1400183c9
mov rcx, rbx
call fcn.140003e00
sub qword [rbp], 1
jne 0x1400183d8
mov rcx, rbp
call fcn.140003e00
sub qword [rdi], 1
jne 0x1400183f9
mov rcx, rdi
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.140003e00
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movzx eax, byte [rsi]
mov word [rsp + 0x50], 0
test al, al
je 0x140018522
lea rdx, [rsp + 0x4a]
xor r14d, r14d
lea r12, [rsp + 0x50]
mov r13d, 0x28
mov qword [rsp + 0x28], rdx
lea rdx, [rsp + 0x4c]
mov qword [rsp + 0x30], rdx
nop dword [rax]
mov rdx, qword [rsp + 0x28]
mov r15, r13
mov byte [rsp + 0x4a], al
lea rbx, [r12 + r14*2]
mov rcx, qword [rsp + 0x30]
mov r8d, 2
sub r15, r14
mov byte [rsp + 0x4b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x14003b8bc
cmp word [r12 + r14*2], 0
movzx eax, word [rsp + 0x4c]
je 0x14001849e
nop word [rax + rax]
add rbx, 2
sub r15, 1
cmp word [rbx], 0
jne 0x140018490
test r15, r15
je 0x14003b8bc
mov word [rbx], ax
add r14, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rsi + r14]
test al, al
jne 0x140018448
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.python38.dll_PyObject_DelItem]
test eax, eax
je 0x1400183c9
mov rcx, qword [rsp + 0x38]
call fcn.140004150
jmp 0x1400183c9
lea rcx, [0x1400452a8]
call qword [sym.imp.python38.dll_PyImport_ImportModule]
mov qword [rdi], rax
mov rcx, rax
test rax, rax
jne 0x140018361
jmp 0x14003b8bc
mov ecx, 1
call qword [sym.imp.python38.dll_PyErr_PrintEx]
mov ecx, 1
call qword [sym.imp.python38.dll_Py_Exit]
lea r12, [rsp + 0x50]
jmp 0x1400184bd
Function at 0x14001ae90
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rsi, str.NUITKA_ONEFILE_BINARY
mov ebx, ecx
mov rcx, rsi
call fcn.140018130
test rax, rax
je 0x14001aff0
mov rcx, rax
mov rdx, 0xffffffffffffffff
lea r14, [rsp + 0x40]
call qword [sym.imp.python38.dll_PyUnicode_FromWideChar]
xor ecx, ecx
mov r15, r14
lea r12, [rsi + 0x28]
mov word [rsp + 0x40], cx
mov r13, rax
lea rbp, [rsp + 0x3a]
mov eax, 0x4e
lea rdi, [rsp + 0x3c]
nop word [rax + rax]
mov rbx, r12
mov r8d, 2
mov rdx, rbp
mov rcx, rdi
sub rbx, rsi
mov byte [rsp + 0x3a], al
mov byte [rsp + 0x3b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x14003b8c2
cmp word [r15], 0
movzx edx, word [rsp + 0x3c]
mov rax, r15
je 0x14001af46
nop dword [rax]
add rax, 2
sub rbx, 1
cmp word [rax], 0
jne 0x14001af38
test rbx, rbx
je 0x14003b8c2
mov word [rax], dx
add rsi, 1
xor edx, edx
add r15, 2
mov word [rax + 2], dx
movzx eax, byte [rsi]
test al, al
jne 0x14001aef8
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rax, qword [sym.imp.python38.dll__PyRuntime]
mov rbx, qword [0x140049c10]
mov rsi, qword [rax + 0x510]
mov rdx, qword [rbx]
mov rax, qword [0x140049b60]
mov rdi, qword [rax + 0x1c0]
test rdx, rdx
je 0x14001b04b
mov r8, rdi
mov rcx, rsi
call fcn.1400186f0
mov r8, r13
mov rcx, rsi
mov rbx, rax
mov rdx, rax
call fcn.14001a440
sub qword [rbx], 1
jne 0x14001afd7
mov rdx, qword [rbx + 8]
mov qword [rsp + 0x28], rax
mov rcx, rbx
call qword [rdx + 0x30]
mov rax, qword [rsp + 0x28]
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [0x140052e30]
lea rsi, [0x140052e30]
test bl, bl
je 0x14001b010
mov rax, qword [0x140052e38]
lea rsi, [0x140052e38]
test rax, rax
jne 0x14001afd7
mov rax, qword [0x140049b80]
cmp byte [rax], 0
jne 0x14001b029
movzx ecx, bl
call fcn.1400251c0
mov rcx, qword [0x140049a70]
mov rdx, 0xffffffffffffffff
call qword [sym.imp.python38.dll_PyUnicode_FromWideChar]
mov qword [rsi], rax
test rax, rax
je 0x14001b078
add qword [rax], 1
jmp 0x14001afd7
mov rbp, qword [0x140049bb0]
mov r12, qword [rax + 0x1b0]
mov rdx, qword [rbp]
test rdx, rdx
je 0x14001b083
mov r8, r12
mov rcx, rsi
call fcn.1400186f0
mov qword [rbx], rax
mov rdx, rax
jmp 0x14001afa1
call qword [sym.imp.python38.dll_PyErr_Print]
call sub.msvcrt.dll_abort
lea rcx, [0x1400452a8]
call qword [sym.imp.python38.dll_PyImport_ImportModule]
mov qword [rbp], rax
mov rdx, rax
test rax, rax
je 0x14003b8c2
jmp 0x14001b062
Function at 0x1400297c0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call fcn.14003aea0
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.14003aea0
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop

Function at 0x14002a492
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400530c8]
test eax, eax
je 0x14002a52a
lea rax, [0x1400530a0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400530d0]
mov qword [rbp - 8], rax
jmp 0x14002a50e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x14002a502
cmp qword [rbp - 0x10], 0
je 0x14002a502
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x14002a4c8
lea rax, [0x1400530a0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14002a52b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x14002a630
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x14002a658
mov eax, 0
jmp 0x14002a6a6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x14002a681
mov eax, 0
jmp 0x14002a6a6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x14002a6a1
mov eax, 0
jmp 0x14002a6a6
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x14002a6ac
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x14002a72a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x14002a721
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x14002a721
mov rax, qword [rbp - 8]
jmp 0x14002a73f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x14002a6f4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x005251c0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x005251d0]
mov dword [rax], 1
mov rax, qword [0x005251e0]
mov dword [rax], 1
mov rax, qword [0x005251b0]
mov dword [rax], 1
mov rax, qword [0x00525080]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x005251a0]
mov dword [0x0053f008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x00525160]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x00524f00]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058

Function at 0x402d70
Capabilities:
Get socket status

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x258
mov qword [rsp + 0x48], rcx
lea esi, [rcx + 1]
mov dword [rsp + 0x40], 1
lea rbp, [rsp + 0x40]
mov dword [rsp + 0x38], 0
lea rdi, [rsp + 0x38]
mov dword [rsp + 0x3c], edx
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov rdx, rbp
mov ecx, esi
call qword [sym.imp.WS2_32.dll_select]
movsxd rbx, eax
test rbx, rbx
jns 0x402dca
call qword [sym.imp.msvcrt.dll__errno]
cmp dword [rax], 4
je 0x402da1
mov rax, rbx
add rsp, 0x258
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x403050
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp rcx, rdx
mov rsi, rcx
mov rbp, rdx
je 0x403141
lea rbx, [rsi + 1]
mov rdi, rdx
mov r8d, 0x3f
sub rdi, rcx
bsr rax, rdi
xor rax, 0x3f
cdqe
sub r8, rax
add r8, r8
call fcn.00402600
cmp rdi, 0x10
jle 0x403150
lea rdi, [rsi + 0x10]
mov r13d, 1
jmp 0x4030c8
mov r8, rbx
sub r8, rsi
jne 0x4031c3
add rbx, 1
mov byte [rsi], r12b
cmp rdi, rbx
je 0x403102
movzx r12d, byte [rbx]
cmp r12b, byte [rsi]
jl 0x4030b0
movzx edx, byte [rbx - 1]
lea rax, [rbx - 1]
cmp r12b, dl
jl 0x4030e6
jmp 0x403205
mov rax, rcx
mov byte [rax + 1], dl
movzx edx, byte [rax - 1]
lea rcx, [rax - 1]
cmp r12b, dl
jl 0x4030e3
add rbx, 1
mov byte [rax], r12b
cmp rdi, rbx
jne 0x4030c8
cmp rbp, rdi
je 0x403141
nop word [rax + rax]
movzx ecx, byte [rdi]
lea rax, [rdi - 1]
movzx edx, byte [rdi - 1]
cmp cl, dl
jl 0x403127
jmp 0x4031e0
mov rax, r8
mov byte [rax + 1], dl
movzx edx, byte [rax - 1]
lea r8, [rax - 1]
cmp cl, dl
jl 0x403124
add rdi, 1
mov byte [rax], cl
cmp rbp, rdi
jne 0x403110
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
cmp rbp, rbx
mov r12d, 1
jne 0x403174
jmp 0x403141
mov r8, rbx
sub r8, rsi
jne 0x4031b0
mov byte [rsi], dil
add rbx, 1
cmp rbp, rbx
je 0x403141
movzx edi, byte [rbx]
cmp dil, byte [rsi]
jl 0x403160
movzx edx, byte [rbx - 1]
lea rax, [rbx - 1]
cmp dil, dl
jl 0x403193
jmp 0x403200
mov rax, rcx
mov byte [rax + 1], dl
movzx edx, byte [rax - 1]
lea rcx, [rax - 1]
cmp dil, dl
jl 0x403190
mov byte [rax], dil
jmp 0x40316b
mov rcx, r12
mov rdx, rsi
sub rcx, r8
add rcx, rbx
call sym.memmove
jmp 0x403168
mov rcx, r13
mov rdx, rsi
sub rcx, r8
add rcx, rbx
call sym.memmove
jmp 0x4030bc
mov rax, rdi
add rdi, 1
cmp rbp, rdi
mov byte [rax], cl
jne 0x403110
jmp 0x403141
mov rax, rbx
jmp 0x4031a3
mov rax, rbx
jmp 0x4030f6