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

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rcx, str.GCC_COLORS
call sub.msvcrt.dll_getenv
test rax, rax
mov rbp, rax
je 0x40687c
movzx r14d, byte [rax]
xor eax, eax
test r14b, r14b
je 0x406881
lea rdi, [rbp + 1]
xor r13d, r13d
xor esi, esi
xor r12d, r12d
jmp 0x406770
test r12, r12
je 0x406768
cmp r14b, 0x3b
je 0x406768
sub r14d, 0x30
cmp r14b, 9
ja 0x40687c
nop dword [rax]
movzx r14d, byte [rdi]
add rdi, 1
lea rax, [rdi - 1]
test r14b, r14b
je 0x4067a8
cmp r14b, 0x3a
je 0x4067a8
cmp r14b, 0x3d
jne 0x406748
cmp rax, rbp
je 0x40687c
test r12, r12
jne 0x40687c
sub rax, rbp
mov r12, rdi
mov rsi, rax
jmp 0x406768
test r12, r12
mov rcx, qword [0x00482020]
je 0x406868
lea rbx, [0x00482020]
sub rax, r12
test rcx, rcx
mov r13, rax
je 0x4067fd
lea rbx, [0x00482020]
jmp 0x4067e5
mov rcx, qword [rbx + 0x18]
add rbx, 0x18
test rcx, rcx
je 0x4067fd
movzx eax, byte [rbx + 0x10]
cmp rax, rsi
jne 0x4067d8
mov r8, rsi
mov rdx, rbp
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x4067d8
test r12, r12
mov rcx, qword [rbx + 8]
je 0x406851
test rcx, rcx
je 0x406851
cmp byte [rbx + 0x11], 0
jne 0x406890
lea rcx, [r13 + 7]
call fcn.00457cb0
mov r8, r13
mov rdx, r12
mov rbp, rax
mov eax, 0x5b1b
mov word [rbp], ax
lea rcx, [rbp + 2]
call sub.msvcrt.dll_memcpy
lea rax, [rbp + r13 + 2]
mov qword [rbx + 8], rbp
mov dword [rax], 0x4b5b1b6d
mov byte [rax + 4], 0
mov byte [rbx + 0x11], 1
movzx r14d, byte [rdi - 1]
test r14b, r14b
je 0x40687c
mov rbp, rdi
xor r12d, r12d
jmp 0x406768
sub rax, rbp
test rcx, rcx
mov rsi, rax
jne 0x4067ca
test r14b, r14b
jne 0x406856
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
call fcn.004694f0
jmp 0x406811
sub rsp, 0x38
cmp ecx, 1
je 0x40698f
cmp ecx, 2
jne 0x406970
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x406980
xor eax, eax
add rsp, 0x38
ret
test ecx, ecx
je 0x406966
jmp 0x47fa80
lea rdx, [rsp + 0x2c]
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x406966
add rsp, 0x38
jmp 0x406700

Function at 0x4069a0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x28
cmp ecx, 1
je 0x4069c8
and ecx, 0xfffffffd
jne 0x4069c0
xor edx, edx
mov eax, edx
add rsp, 0x28
ret
jmp 0x47fa99
lea rcx, str.GCC_URLS
call sub.msvcrt.dll_getenv
test rax, rax
je 0x406a10
cmp byte [rax], 0
je 0x4069ae
movzx edx, byte [rax]
cmp edx, 0x6e
je 0x406a00
cmp edx, 0x73
jne 0x4069f1
cmp byte [rax + 1], 0x74
je 0x406a28
mov edx, 2
jmp 0x4069b0
cmp byte [rax + 1], 0x6f
jne 0x4069e6
cmp byte [rax + 2], 0
je 0x4069ae
jmp 0x4069e6
lea rcx, str.TERM_URLS
call sub.msvcrt.dll_getenv
test rax, rax
jne 0x4069d9
jmp 0x4069f1
cmp byte [rax + 2], 0
mov edx, 1
je 0x4069b0
jmp 0x4069f1
Function at 0x410ed0
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
test r8, r8
mov rdi, rcx
mov rbp, rdx
mov rsi, r8
je 0x410f3a
mov r12, qword [sym.imp.KERNEL32.dll_WriteFile]
lea r13, [rsp + 0x3c]
mov rbx, r8
jmp 0x410f09
mov eax, dword [rsp + 0x3c]
sub rbx, rax
je 0x410f3a
mov r8d, 0xffffffff
mov rdx, rsi
mov r9, r13
mov qword [rsp + 0x20], 0
cmp rbx, r8
mov rcx, rdi
cmovbe r8, rbx
sub rdx, rbx
add rdx, rbp
mov dword [rsp + 0x3c], r8d
call r12
test eax, eax
jne 0x410f00
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
Function at 0x416a70
Capabilities:
Read file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
mov rcx, qword [rcx + 0x10]
call sub.msvcrt.dll_feof
test eax, eax
je 0x416a90
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
mov rcx, qword [rbx + 0x10]
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x416a86
mov rcx, rbx
call fcn.00416970
mov rax, qword [rbx + 0x30]
mov edx, 1
mov rcx, qword [rbx + 0x18]
mov r8, qword [rbx + 0x28]
mov r9, qword [rbx + 0x10]
add rcx, rax
sub r8, rax
call sub.msvcrt.dll_fread
mov rcx, qword [rbx + 0x10]
mov rsi, rax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x416a86
add qword [rbx + 0x30], rsi
test rsi, rsi
setne al
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x42b0a0
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
movzx r12d, word [rdx + 0x4e]
and r12w, 0xf000
mov r13, rcx
mov rbp, rdx
cmp r12w, 0x3000
mov r15d, r8d
mov r14, r9
je 0x42b1e8
cmp r12w, 0x8000
mov ecx, 0x2010
mov esi, 0x2000
jne 0x42b0ed
mov rsi, qword [rdx + 0x60]
lea rcx, [rsi + 0x10]
call fcn.00457cb0
xor ebx, ebx
mov rdi, rax
nop word [rax + rax]
mov ecx, dword [rbp + 0x80]
lea rdx, [rdi + rbx]
mov r8d, esi
sub r8d, ebx
call sub.msvcrt.dll__read
cdqe
test rax, rax
jle 0x42b140
add rbx, rax
cmp rsi, rbx
jne 0x42b100
cmp r12w, 0x8000
je 0x42b142
add rsi, rsi
mov rcx, rdi
lea rdx, [rsi + 0x10]
call fcn.00457d30
mov rdi, rax
jmp 0x42b100
jne 0x42b1c0
cmp r12w, 0x8000
sete dl
test r13, r13
setne al
test dl, al
je 0x42b15e
cmp rbx, rsi
jne 0x42b210
lea rax, [rbp + 0x60]
mov rdx, r14
mov rcx, r13
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x30]
mov r8, rdi
mov qword [rsp + 0x28], rax
lea r9, [rsi + 0x10]
call fcn.004212a0
test rax, rax
mov qword [rbp + 0x28], rax
movzx eax, byte [rbp + 0x8a]
setne cl
mov edx, ecx
shl edx, 2
and eax, 0xfffffffb
or eax, edx
mov byte [rbp + 0x8a], al
mov eax, ecx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test r13, r13
je 0x42b1d9
mov r8, qword [rbp + 8]
mov r9d, r15d
mov edx, 3
mov rcx, r13
call fcn.004262c0
mov rcx, rdi
call fcn.004694f0
xor ecx, ecx
jmp 0x42b1a8
test rcx, rcx
je 0x42b1e1
mov rax, qword [rdx + 8]
lea r9, str._s_is_a_block_device
mov edx, 3
mov qword [rsp + 0x20], rax
call fcn.004261a0
xor ecx, ecx
jmp 0x42b1a8
mov rax, qword [rbp + 8]
lea r9, str._s_is_shorter_than_expected
mov r8d, r15d
xor edx, edx
mov rcx, r13
mov qword [rsp + 0x20], rax
call fcn.004261a0
jmp 0x42b15e
Function at 0x42c840
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov r12d, dword [rsp + 0x90]
cmp r9d, 3
mov rbx, rcx
mov rdi, rdx
mov ebp, r8d
mov esi, r9d
je 0x42c8b8
call fcn.0042b4e0
test rax, rax
mov r8, rax
je 0x42c8a3
cmp esi, 4
mov dword [rsp + 0x28], r12d
mov r9d, ebp
mov rdx, rdi
sete al
sete r13b
mov rcx, rbx
movzx eax, al
add eax, eax
mov dword [rsp + 0x20], eax
call fcn.0042b660
test rax, rax
jne 0x42c90a
test r13b, r13b
je 0x42c90a
xor eax, eax
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rdx, qword [rcx + 0x1e8]
mov rax, qword [rcx + 0x1c0]
cmp rax, qword [rdx + 0x10]
je 0x42c8d3
mov dword [rax - 0x20], 0
mov r8d, ebp
mov r9d, 3
mov rdx, rdi
mov rcx, rbx
call fcn.0042b4e0
test rax, rax
mov r8, rax
je 0x42c8a3
mov dword [rsp + 0x28], r12d
mov r9d, ebp
mov rdx, rdi
mov rcx, rbx
mov dword [rsp + 0x20], 0
call fcn.0042b660
mov r9d, r12d
mov r8d, esi
mov rdx, rax
mov rcx, rbx
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp fcn.0042c210

Function at 0x430990
Capabilities:
Write file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
lea rax, [0x004d3a20]
movzx r8d, byte [rcx + 4]
mov rdi, rdx
movzx edx, r8b
mov rsi, rcx
shl rdx, 4
add rax, rdx
mov edx, dword [rax]
cmp edx, 1
je 0x430a50
cmp edx, 2
je 0x430a10
test edx, edx
jne 0x4309fb
movzx edx, word [rsi + 8]
test dl, 2
jne 0x430ac8
and edx, 0x10
jne 0x430a50
mov rbx, qword [rax + 8]
movzx ecx, byte [rbx]
nop dword [rax]
add rbx, 1
mov rdx, rdi
call sub.msvcrt.dll_putc
movzx ecx, byte [rbx]
test ecx, ecx
jne 0x4309e8
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp r8b, 0x45
je 0x430ae0
mov rcx, qword [rsi + 0x18]
mov r9, rdi
mov edx, 1
mov r8d, dword [rsi + 0x10]
call sub.msvcrt.dll_fwrite
cmp byte [rsi + 4], 0x45
jne 0x4309fb
mov rdx, rdi
mov ecx, 0x22
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp sub.msvcrt.dll_fputc
mov rax, qword [rsi + 0x10]
mov edx, dword [rax + 8]
mov rbp, qword [rax]
test edx, edx
je 0x4309fb
lea r12, [rsp + 0x26]
xor ebx, ebx
jmp 0x430a93
mov rax, qword [rax]
mov rdx, rdi
movzx ecx, byte [rax + rbx]
call sub.msvcrt.dll_fputc
mov rax, qword [rsi + 0x10]
add rbx, 1
mov edx, dword [rax + 8]
cmp rbx, rdx
jae 0x4309fb
lea rdx, [rbp + rbx]
cmp byte [rdx], 0
jns 0x430a70
mov rcx, r12
call fcn.0042edb0
mov r9, rdi
mov edx, 1
mov rcx, r12
lea rbx, [rbx + rax - 1]
mov r8d, 0xa
call sub.msvcrt.dll_fwrite
jmp 0x430a7f
lea rax, [0x004d3fa0]
sub r8d, 0x26
movsxd r8, r8d
mov rbx, qword [rax + r8*8]
jmp 0x4309e1
mov rdx, rdi
mov ecx, 0x22
call sub.msvcrt.dll_fputc
jmp 0x430a1a
Function at 0x43ce70
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov eax, dword [rdx + 0x18]
movzx edi, byte [rcx + 0x4d9]
test eax, eax
mov rsi, rcx
mov rbx, rdx
je 0x43ce99
cmp qword [rdx + 8], 0
je 0x43ceb0
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
cmp byte [rcx + 0x4c6], 0
mov byte [rcx + 0x4c6], 0
mov ecx, 0x800
setne r12b
call fcn.00457cb0
mov qword [rbx + 8], rax
cmp byte [rsi + 0x4d9], 0
jne 0x43d068
mov eax, dword [rbx + 0x18]
test dil, dil
mov r13, qword [rbx]
lea ebp, [rax + 1]
je 0x43d020
mov dword [rsp + 0x28], ebp
xor r8d, r8d
xor edx, edx
mov rcx, rsi
mov qword [rsp + 0x20], r13
mov r9, qword [rbx + 0x20]
call fcn.00439c10
cmp byte [rsi + 0x23], 0
mov edi, 0x100
mov byte [rsi + 0x23], 1
mov edx, dword [rbx + 0x1c]
lea rbp, [rsp + 0x3c]
setne r13b
jmp 0x43cf4e
test rcx, rcx
je 0x43cff8
mov r9, qword [rbx + 0x28]
mov qword [rcx + r8*8], rax
lea r9, [r9 + r8*4]
test r9, r9
je 0x43cf48
mov dword [r9], r10d
mov edx, dword [rbx + 0x1c]
add edx, 1
mov dword [rbx + 0x1c], edx
lea r14d, [rdx + 1]
cmp rdi, r14
jae 0x43cf78
mov rcx, qword [rbx + 8]
mov rdx, r14
shl rdx, 4
call fcn.00457d30
mov qword [rbx + 8], rax
cmp byte [rsi + 0x4d9], 0
jne 0x43cfb0
lea rdi, [r14 + r14]
mov rdx, rbp
mov rcx, rsi
call fcn.0043c600
cmp byte [rax + 4], 0x16
je 0x43cfd0
mov r8d, dword [rbx + 0x1c]
cmp byte [rsi + 0x4d9], 0
mov r10d, dword [rsp + 0x3c]
mov rcx, qword [rbx + 8]
mov rdx, r8
jne 0x43cf28
test rcx, rcx
je 0x43cff8
mov qword [rcx + r8*8], rax
jmp 0x43cf48
mov rcx, qword [rbx + 0x28]
lea rdx, [r14*8]
test rcx, rcx
je 0x43d008
call fcn.00457d30
mov qword [rbx + 0x28], rax
jmp 0x43cf74
mov rcx, rsi
call fcn.0043a430
mov byte [rsi + 0x4c6], r12b
mov byte [rsi + 0x23], r13b
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov qword [0], rax
ud2
mov rcx, rdx
call fcn.00457cb0
mov qword [rbx + 0x28], rax
jmp 0x43cf74
mov rax, qword [rsi + 0x88]
mov rdx, qword [rax]
test rdx, rdx
je 0x43d07b
lea rax, [r13 + rbp*8]
mov qword [rsi + 0x88], rdx
pxor xmm0, xmm0
movq xmm1, rax
movups xmmword [rdx + 0x20], xmm0
movq xmm0, r13
punpcklqdq xmm0, xmm1
mov dword [rdx + 0x30], 0
movups xmmword [rdx + 0x10], xmm0
jmp 0x43cf09
mov ecx, 0x400
call fcn.00457cb0
mov qword [rbx + 0x28], rax
jmp 0x43cedd
mov ecx, 0x38
call fcn.00457cb0
mov ecx, 7
mov rdx, rax
xor eax, eax
mov rdi, rdx
rep stosq qword [rdi], rax
mov rax, qword [rsi + 0x88]
mov qword [rdx + 8], rax
mov qword [rax], rdx
jmp 0x43d02f
Function at 0x43ee10
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp byte [rsp + 0x80], 0
mov rbx, rcx
mov rbp, rdx
mov edi, r8d
mov r13d, r9d
jne 0x43eeb0
mov rcx, rbx
call sub.msvcrt.dll_strlen
test edi, edi
mov rsi, rax
mov r12d, eax
je 0x43ee5d
test r13d, r13d
jne 0x43ee80
lea r12d, [rdi + 1]
mov rdx, rbp
mov ecx, 0x20
add r12d, esi
call sub.msvcrt.dll_fputc
mov rdx, rbp
mov rcx, rbx
call sub.msvcrt.dll_fputs
mov eax, r12d
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
lea eax, [rdi + rax]
cmp r13d, eax
jae 0x43ee49
mov r9, rbp
mov r8d, 3
mov edx, 1
lea rcx, [0x004d4d80]
mov r12d, 1
call sub.msvcrt.dll_fwrite
jmp 0x43ee4d
mov rdx, qword [rsp + 0x88]
call fcn.0043ece0
mov rbx, rax
jmp 0x43ee32
Function at 0x443880
Capabilities:
Read file on windows

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r13, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x90]
mov edi, edx
mov rbx, rcx
mov rdx, r8
mov ecx, edi
xor r8d, r8d
mov rsi, r9
call fcn.00463bc0
test rax, rax
js 0x443960
mov r9, qword [rsp + 0x88]
mov rdx, rsi
mov r8, r13
mov rcx, rbx
call fcn.00442260
test rax, rax
mov rdx, rax
mov qword [rbp + 8], rax
je 0x443936
xor ebx, ebx
test rsi, rsi
mov qword [rbp], rax
mov r12d, esi
mov qword [rbp + 0x10], rsi
jne 0x4438fe
jmp 0x443945
je 0x443940
add rbx, rax
cmp rbx, rsi
jae 0x443945
mov rdx, qword [rbp + 8]
mov r8d, r12d
mov ecx, edi
sub r8d, ebx
call sub.msvcrt.dll__read
cdqe
test rax, rax
jns 0x4438f0
call qword [sym.imp.msvcrt.dll__errno]
mov rcx, qword [rsp + 0x88]
lea rdx, str.read
mov r8d, dword [rax]
call r13
mov rcx, qword [rbp + 8]
call fcn.004694f0
xor eax, eax
jmp 0x44394a
cmp rbx, rsi
jb 0x443980
mov eax, 1
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
call qword [sym.imp.msvcrt.dll__errno]
mov rcx, qword [rsp + 0x88]
lea rdx, str.lseek
mov r8d, dword [rax]
call r13
xor eax, eax
jmp 0x44394a
mov rcx, qword [rsp + 0x88]
xor r8d, r8d
lea rdx, str.file_too_short
call r13
mov rcx, qword [rbp + 8]
call fcn.004694f0
xor eax, eax
jmp 0x44394a
Function at 0x454fa0
Capabilities:
Read file on windows

Disassembly:
push r13
mov eax, 0x1118
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.00462cf0
sub rsp, rax
movdqa xmm0, xmmword [0x004d7680]
mov ebp, 0x1000
movaps xmmword [rsp + 0x20], xmm0
lea r12, [rsp + 0x20]
mov rdi, rcx
mov r13, rdx
mov dword [rsp + 0x38], 0
lea rsi, [rsp + 0xc0]
mov qword [rsp + 0x30], 0
nop dword [rax + rax]
xor ebx, ebx
nop word [rax + rax]
mov r8, rbp
mov r9, rdi
mov edx, 1
lea rcx, [rsi + rbx]
sub r8, rbx
call sub.msvcrt.dll_fread
add rbx, rax
cmp rbx, 0xfff
ja 0x455058
test rax, rax
jne 0x454ff8
mov rcx, rdi
call sub.msvcrt.dll_ferror
test eax, eax
mov edi, eax
jne 0x45507f
lea rbp, [rsp + 0x20]
test rbx, rbx
jne 0x45506f
mov rdx, r13
mov rcx, rbp
call fcn.00454c50
mov eax, edi
add rsp, 0x1118
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
test rax, rax
je 0x455020
mov r8, r12
mov edx, 0x1000
mov rcx, rsi
call fcn.004543c0
jmp 0x454ff0
mov r8, rbp
mov rdx, rbx
mov rcx, rsi
call fcn.00454d00
jmp 0x455038
mov edi, 1
jmp 0x455043
Function at 0x461f20
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
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.00468e10
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.00468e10
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 0x461f90
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004eb6a4]
test esi, esi
mov rbx, rcx
jle 0x4620c0
mov rax, qword [0x004eb6a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x461fdb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x462065
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x461fc0
mov rcx, rbx
call fcn.00462a10
test rax, rax
mov rdi, rax
je 0x4620e2
mov rax, qword [0x004eb6a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.00462b50
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x004eb6a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4620c7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x46205e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x462070
add dword [0x004eb6a4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x004eb6a8]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x46205e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00461f20
nop dword [rax]
xor esi, esi
jmp 0x461fe8
mov rax, qword [0x004eb6a8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call fcn.00461f20
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.00461f20
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x462680
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x004eb700]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004eb6e0]
test rbx, rbx
je 0x4626dc
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 0x4626d3
test eax, eax
jne 0x4626d3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4626b8
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 0x462a10
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x004daec0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x462a30
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x462a38
ret
cmp word [r8 + 0x18], 0x20b
jne 0x462a30
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x462a8d
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]
cmp rcx, r8
mov rdx, r8
jb 0x462a84
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x462a30
add rax, 0x28
cmp rax, r9
jne 0x462a70
xor eax, eax
ret

Function at 0x462a90
Capabilities:
Parse pe header

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

Function at 0x462b50
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x004daec0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x462b6f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x462b78
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x463640
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x138
mov rbx, rcx
call sub.msvcrt.dll__errno
test rbx, rbx
mov dword [rax], 0
je 0x463780
cmp byte [rbx], 0
je 0x463748
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x463790
test al, 0x10
je 0x463748
lea rdi, [rsp + 0x20]
mov rdx, rbx
mov r8d, 0x104
mov rcx, rdi
call sub.msvcrt.dll__fullpath
mov rcx, rdi
call sub.msvcrt.dll_strlen
lea rcx, [rax + 0x24b]
mov rsi, rax
call sub.msvcrt.dll_malloc
test rax, rax
mov rbx, rax
je 0x46379f
lea rbp, [rsi + 1]
mov rdx, rdi
lea rcx, [rax + 0x244]
mov r8, rbp
call sub.msvcrt.dll_memcpy
cmp byte [rbx + 0x244], 0
mov rcx, rax
je 0x4636f0
movzx eax, byte [rbx + rsi + 0x243]
cmp al, 0x5c
je 0x4636f0
cmp al, 0x2f
jne 0x463768
lea rdx, [rbx + 0x130]
mov eax, 0x2a
mov word [rcx + rsi], ax
mov rdi, rdx
xor eax, eax
mov ecx, 0x20
mov qword [rbx + 0x238], 0xffffffffffffffff
mov dword [rbx + 0x240], 0
mov qword [rbx + 0x128], 0
rep stosq qword [rdi], rax
mov rax, rbx
mov dword [rdi], 0
add rsp, 0x138
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 0x14
mov rax, rbx
add rsp, 0x138
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov edx, 0x5c
mov word [rcx + rsi], dx
mov rsi, rbp
jmp 0x4636f0
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 0xe
jmp 0x463755
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 2
jmp 0x463755
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 0xc
jmp 0x463755
Function at 0x46b460
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x98
movabs rax, 0x6c6320726f727245
mov qword [rsp + 0x20], rax
movabs rax, 0x7520676e696e6165
mov qword [rsp + 0x28], rax
movabs rax, 0x6b5f6e6970732070
mov qword [rsp + 0x30], rax
movabs rax, 0x20726f6620737965
mov qword [rsp + 0x38], rax
movabs rax, 0x20646165726874
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov dword [rsp + 0x87], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x46b56a
lea rcx, [rsp + 0x20]
mov eax, 0x28
jmp 0x46b542
add rax, 1
cmp rax, 0x6b
je 0x46b55f
cmp byte [rcx + rax], 0
jne 0x46b538
lea edx, [rax + 1]
cmp eax, 0x6a
je 0x46b55f
cdqe
mov byte [rsp + rax + 0x20], 0xa
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
lea rcx, [rsp + 0x20]
mov edx, 0x28
mov eax, 0x27
jmp 0x46b550

Function at 0x46b8e0
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x004ec220], 1
je 0x46b958
lea rdi, [0x004ec220]
mov rcx, rdi
call fcn.0046b1f0
lea rbp, [rax + 8]
mov rbx, rax
mov rcx, rbp
call fcn.0046ab20
mov esi, dword [0x004ec220]
test esi, esi
jne 0x46b968
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x00482358], eax
je 0x480fd6
mov dword [0x004ec220], 1
mov rcx, rbp
call fcn.0046adf0
test rbx, rbx
je 0x46b958
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp fcn.0046b580
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp esi, 1
je 0x46b938
mov ecx, 2
call qword [fcn.00468e10]
mov r9d, esi
mov r8, rdi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x46b938
call sub.msvcrt.dll_abort
nop
Function at 0x46b990
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
call fcn.0046b690
cmp qword [0x004ef048], 0
mov rbx, rax
je 0x46baa8
test rax, rax
je 0x46baa8
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, 1
mov dword [rbx + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call fcn.0046b0f0
cmp eax, 1
je 0x46bab6
mov rbp, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rbp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rsi, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, rdi
mov rdx, rsi
mov dword [rsp + 0x28], 0
lea r9, [rbx + 0x28]
mov rcx, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je fcn.00480fdc
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x00482358]
mov rdx, rbx
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x46babc
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.0046b460
nop
jmp fcn.00480fdc

Function at 0x46bad0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.0046b8e0
mov ecx, dword [0x00482358]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x46baf0
add rsp, 0x28
ret
add rsp, 0x28
jmp fcn.0046b990