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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
movzx eax, byte [rdx + 0x8d]
mov r12, rcx
mov r15, rdx
mov r13d, r8d
test al, al
jne 0x43db23
movzx ebp, byte [rdx + 0x8b]
test bpl, bpl
jne 0x43db23
mov edx, dword [rdx + 0x84]
test edx, edx
jne 0x43db23
cmp dword [r15 + 0x80], 0xffffffff
je 0x43db50
movzx eax, word [r15 + 0x4e]
and ax, 0xf000
cmp ax, 0x3000
je 0x43db7c
cmp ax, 0x8000
je 0x43db34
xor r14d, r14d
mov ecx, 0x2010
mov esi, 0x2000
call fcn.0046aaf0
xor ebx, ebx
mov rdi, rax
nop dword [rax + rax]
mov ecx, dword [r15 + 0x80]
lea rdx, [rdi + rbx]
mov r8d, esi
sub r8d, ebx
call sub.msvcrt.dll__read_1
cdqe
cmp rax, 0
jle 0x43da93
add rbx, rax
cmp rsi, rbx
jne 0x43da50
test r14b, r14b
jne 0x43dbb0
add rsi, rsi
mov rcx, rdi
lea rdx, [rsi + 0x10]
call fcn.0046ab70
mov rdi, rax
jmp 0x43da50
jne 0x43dbb8
cmp rsi, rbx
je 0x43dac0
test r14b, r14b
je 0x43dac0
mov rax, qword [r15 + 8]
lea r9, str._s_is_shorter_than_expected
mov r8d, r13d
xor edx, edx
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.00438b40
lea rax, [r15 + 0x60]
mov rdx, qword [r12 + 0x470]
lea r9, [rsi + 0x10]
mov qword [rsp + 0x20], rbx
mov r8, rdi
mov rcx, r12
mov qword [rsp + 0x30], rax
lea rax, [r15 + 0x30]
mov qword [rsp + 0x28], rax
call fcn.00434950
mov byte [r15 + 0x8d], 1
mov qword [r15 + 0x28], rax
mov ecx, dword [r15 + 0x80]
mov byte [r15 + 0x8b], bpl
call sub.msvcrt.dll__close_1
movzx eax, byte [r15 + 0x8b]
mov dword [r15 + 0x80], 0xffffffff
xor eax, 1
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rsi, qword [r15 + 0x60]
mov r14d, 1
lea rcx, [rsi + 0x10]
jmp 0x43da3e
mov rcx, r15
call fcn.0043d470
test al, al
jne 0x43da14
mov r9d, r13d
xor r8d, r8d
mov rdx, r15
mov rcx, r12
mov byte [rsp + 0x4f], al
call fcn.0043d580
movzx eax, byte [rsp + 0x4f]
jmp 0x43db23
mov rax, qword [r15 + 8]
lea r9, str._s_is_a_block_device
mov r8d, r13d
mov edx, 3
mov rcx, r12
mov ebp, 1
mov qword [rsp + 0x20], rax
call fcn.00438b40
jmp 0x43dafa
mov rbx, rsi
jmp 0x43dac0
mov r8, qword [r15 + 8]
mov r9d, r13d
mov edx, 3
mov rcx, r12
mov ebp, 1
call fcn.00438c20
mov rcx, rdi
call fcn.00483488
jmp 0x43dafa
Function at 0x441cf0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
movzx eax, byte [rcx + 4]
mov rdi, rcx
mov rsi, rdx
mov rcx, rax
shl rax, 4
mov rdx, rax
lea rax, [0x004d9f60]
add rax, rdx
mov edx, dword [rax]
cmp edx, 1
je 0x441d50
jb 0x441dc0
cmp edx, 2
jne 0x441d40
mov r8d, dword [rdi + 8]
mov rcx, qword [rdi + 0x10]
mov r9, rsi
mov edx, 1
call sub.msvcrt.dll_fwrite
nop
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rdi + 8]
mov edx, dword [rax + 8]
mov rbp, qword [rax]
test edx, edx
je 0x441d40
xor ebx, ebx
lea r12, [rsp + 0x26]
jmp 0x441da3
mov rcx, r12
call fcn.00440a60
mov r9, rsi
mov r8d, 0xa
mov edx, 1
mov rcx, r12
lea rbx, [rbx + rax - 1]
call sub.msvcrt.dll_fwrite
mov rax, qword [rdi + 8]
add rbx, 1
mov edx, dword [rax + 8]
cmp rdx, rbx
jbe 0x441d40
lea rdx, [rbp + rbx]
test byte [rdx], 0x80
jne 0x441d70
mov rax, qword [rax]
mov rdx, rsi
movzx ecx, byte [rax + rbx]
call sub.msvcrt.dll_fputc
jmp 0x441d93
movzx edx, word [rdi + 6]
test dl, 2
jne 0x441df3
and edx, 0x10
jne 0x441d50
mov rbx, qword [rax + 8]
movzx ecx, byte [rbx]
add rbx, 1
mov rdx, rsi
call sub.msvcrt.dll_putc
movzx ecx, byte [rbx]
test ecx, ecx
jne 0x441dd5
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
sub ecx, 0x25
lea rax, [0x004da4c0]
movsxd rcx, ecx
mov rbx, qword [rax + rcx*8]
jmp 0x441dd2
Function at 0x44cab0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea eax, [r8 - 1]
mov r12, rdx
mov edx, dword [rcx + 8]
mov r13d, r8d
mov rbp, rcx
cmp eax, 0x20
mov eax, 0x22
cmovbe r13d, eax
test edx, edx
je 0x44cc2d
mov rax, qword [rcx]
xor ebx, ebx
mov rsi, qword [rax]
mov rcx, rsi
call sub.msvcrt.dll_strlen
mov edi, eax
nop word cs:[rax + rax]
mov rdx, r12
mov rcx, rsi
add ebx, 1
call sub.msvcrt.dll_fputs
cmp dword [rbp + 8], ebx
jbe 0x44cb80
mov rax, qword [rbp]
mov r14d, ebx
mov rsi, qword [rax + r14*8]
mov rcx, rsi
call sub.msvcrt.dll_strlen
add edi, eax
test ebx, ebx
mov r15, rax
je 0x44cb00
test r13d, r13d
je 0x44cb61
cmp r13d, edi
jae 0x44cb61
lea rcx, str.__n
mov r9, r12
mov r8d, 4
mov edx, 1
lea edi, [r15 + 1]
call sub.msvcrt.dll_fwrite
mov rax, qword [rbp]
mov rsi, qword [rax + r14*8]
jmp 0x44cb00
mov rdx, r12
mov ecx, 0x20
add edi, 1
call sub.msvcrt.dll_putc
mov rax, qword [rbp]
mov rsi, qword [rax + r14*8]
jmp 0x44cb00
add edi, 1
mov rdx, r12
mov ecx, 0x3a
call sub.msvcrt.dll_putc
mov eax, dword [rbp + 0x18]
test r13d, r13d
setne r14b
xor ebx, ebx
test eax, eax
jne 0x44cbdd
jmp 0x44cc10
test r14b, r14b
je 0x44cbf6
lea rcx, str.__n
lea edi, [r15 + 1]
mov r9, r12
mov r8d, 4
mov edx, 1
call sub.msvcrt.dll_fwrite
mov rax, qword [rbp + 0x10]
mov rdx, r12
add ebx, 1
mov rcx, qword [rax + rsi*8]
call sub.msvcrt.dll_fputs
cmp dword [rbp + 0x18], ebx
jbe 0x44cc10
mov rax, qword [rbp + 0x10]
mov esi, ebx
mov rcx, qword [rax + rsi*8]
call sub.msvcrt.dll_strlen
add edi, eax
mov r15, rax
cmp r13d, edi
jb 0x44cba2
mov rdx, r12
mov ecx, 0x20
add edi, 1
call sub.msvcrt.dll_putc
jmp 0x44cbc5
mov rdx, r12
mov ecx, 0xa
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sub.msvcrt.dll_putc
mov edi, 1
jmp 0x44cb83
Function at 0x450a30
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x80]
mov ebp, edx
mov rdi, rcx
mov rdx, r8
mov ecx, ebp
xor r8d, r8d
mov rbx, r9
call fcn.004776e0
test rax, rax
js 0x450ae0
mov r9, qword [rsp + 0x78]
mov rcx, rdi
mov r8, r12
mov rdx, rbx
xor edi, edi
call fcn.0044f4b0
test rax, rax
mov qword [rsi + 8], rax
je 0x450aa3
mov qword [rsi], rax
mov qword [rsi + 0x10], rbx
mov r8d, ebx
mov rdx, rax
mov ecx, ebp
call sub.msvcrt.dll__read_1
test eax, eax
js 0x450b10
cdqe
mov edi, 1
cmp rbx, rax
ja 0x450ab0
mov eax, edi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
xor r8d, r8d
lea rdx, str.file_too_short
mov rcx, qword [rsp + 0x78]
call r12
mov rcx, qword [rsi + 8]
xor edi, edi
call fcn.00483488
mov eax, edi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call qword [sym.imp.msvcrt.dll__errno]
mov rcx, qword [rsp + 0x78]
mov r8d, dword [rax]
lea rdx, str.lseek
xor edi, edi
call r12
mov eax, edi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call qword [sym.imp.msvcrt.dll__errno]
mov rcx, qword [rsp + 0x78]
mov r8d, dword [rax]
lea rdx, str.read
call r12
mov rcx, qword [rsi + 8]
call fcn.00483488
jmp 0x450aa3
Function at 0x465860
Capabilities:
Hash data with md5

Disassembly:
push rsi
push rbx
sub rsp, 0xc8
lea rbx, [rsp + 0x20]
mov rsi, r8
mov dword [rsp + 0x20], 0x67452301
mov dword [rsp + 0x24], 0xefcdab89
mov dword [rsp + 0x28], 0x98badcfe
mov r8, rbx
mov dword [rsp + 0x2c], 0x10325476
mov dword [rsp + 0x34], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x38], 0
call fcn.004655b0
mov rdx, rsi
mov rcx, rbx
call fcn.004654f0
add rsp, 0xc8
pop rbx
pop rsi
ret

Function at 0x4658d0
Capabilities:
Hash data with md5
Read file on windows

Disassembly:
push r13
push r12
mov eax, 0x1118
push rbp
push rdi
push rsi
push rbx
call fcn.004765e0
sub rsp, rax
mov ebp, 0x1000
lea rsi, [rsp + 0xc0]
lea r12, [rsp + 0x20]
mov rdi, rcx
mov r13, rdx
mov dword [rsp + 0x20], 0x67452301
mov dword [rsp + 0x24], 0xefcdab89
mov dword [rsp + 0x28], 0x98badcfe
mov dword [rsp + 0x2c], 0x10325476
mov dword [rsp + 0x34], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x38], 0
xor ebx, ebx
jmp 0x465945
test rax, rax
je 0x465968
lea rcx, [rsi + rbx]
mov r8, rbp
mov r9, rdi
sub r8, rbx
mov edx, 1
call sub.msvcrt.dll_fread
add rbx, rax
cmp rbx, 0xfff
jbe 0x465940
test rax, rax
je 0x465980
mov r8, r12
mov edx, 0x1000
mov rcx, rsi
call fcn.00464c70
jmp 0x465935
mov rcx, rdi
call sub.msvcrt.dll_ferror
test eax, eax
mov edi, eax
jne 0x4659b5
test rbx, rbx
lea rbp, [rsp + 0x20]
jne 0x4659bc
mov rdx, r13
mov rcx, rbp
call fcn.004654f0
mov eax, edi
add rsp, 0x1118
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov edi, 1
jmp 0x4659a3
mov r8, rbp
mov rdx, rbx
mov rcx, rsi
call fcn.004655b0
jmp 0x465998
Function at 0x468020
Capabilities:
Get common file path

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rax, qword [0x004f0560]
test rax, rax
je 0x468040
add rsp, 0x28
pop rbx
pop rsi
ret
xor edx, edx
xor ecx, ecx
mov rsi, qword [sym.imp.KERNEL32.dll_GetTempPathA]
call rsi
test eax, eax
mov ebx, eax
jne 0x468075
mov rax, qword [0x004f0560]
test rax, rax
jne 0x468032
nop
lea rcx, [0x004de4f0]
call fcn.0046ac10
mov qword [0x004f0560], rax
jmp 0x468032
mov ecx, eax
call fcn.0046aaf0
mov ecx, ebx
mov qword [0x004f0560], rax
mov rdx, rax
call rsi
test eax, eax
jne 0x468053
mov rcx, qword [0x004f0560]
call fcn.00483488
mov qword [0x004f0560], 0
jmp 0x468060

Function at 0x4690e0
Capabilities:
Delete file

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
mov edx, dword [rcx + 0x18]
mov rbx, rcx
test edx, edx
jle 0x4690fb
mov rax, qword [rcx + 0x80]
call qword [rax + 0x18]
mov edx, dword [rbx + 0x2c]
test edx, edx
jle 0x46910f
mov rax, qword [rbx + 0x80]
mov rcx, rbx
call qword [rax + 0x18]
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x46911d
call sub.msvcrt.dll_fclose
mov rcx, qword [rbx + 0x68]
test rcx, rcx
je 0x46912b
call sub.msvcrt.dll_fclose
cmp qword [rbx + 0x40], 0
je 0x4691d1
mov edx, dword [rbx + 0x28]
test edx, edx
jne 0x4691c3
mov rcx, qword [rbx + 0x38]
call fcn.00483488
mov rcx, qword [rbx + 0x40]
call fcn.00483488
mov rcx, qword [rbx + 0x48]
call fcn.00483488
mov eax, dword [rbx + 0x70]
test eax, eax
jle 0x46919f
xor esi, esi
xor edi, edi
nop word [rax + rax]
mov rax, qword [rbx + 0x78]
add edi, 1
mov rcx, qword [rax + rsi]
call sub.msvcrt.dll_remove
mov rax, qword [rbx + 0x78]
mov rcx, qword [rax + rsi]
add rsi, 8
call fcn.00483488
cmp dword [rbx + 0x70], edi
jg 0x469170
mov rcx, qword [rbx + 0x78]
call fcn.00483488
mov rax, qword [rbx + 0x80]
mov rax, qword [rax + 0x40]
test rax, rax
je 0x4691b4
mov rcx, rbx
call rax
mov rcx, rbx
add rsp, 0x30
pop rbx
pop rsi
pop rdi
jmp fcn.00483488
mov rcx, qword [rbx + 0x20]
call fcn.00483488
jmp 0x469141
and dword [rbx], 0xfffffffe
lea r9, [rsp + 0x24]
lea r8, [rsp + 0x28]
mov edx, 1
mov rcx, rbx
call fcn.004684c0
jmp 0x469136
Function at 0x475680
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rsi, rcx
mov ecx, dword [0x004f0c44]
mov rdi, rdx
mov rbp, r8
test ecx, ecx
jle 0x475798
mov rax, qword [0x004f0c48]
xor ebx, ebx
add rax, 8
mov rdx, qword [rax]
cmp rsi, rdx
jb 0x4756cc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rsi, rdx
jb 0x47577e
add ebx, 1
add rax, 0x18
cmp ebx, ecx
jne 0x4756b0
mov rcx, rsi
call fcn.004762e0
test rax, rax
mov r12, rax
je 0x4757d0
movsxd rbx, ebx
lea rbx, [rbx + rbx*2]
shl rbx, 3
mov r13, rbx
add r13, qword [0x004f0c48]
mov qword [r13 + 0x10], rax
mov dword [r13], 0
call fcn.00476430
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
lea rdx, [rsp + 0x20]
mov qword [r13 + 8], rax
mov rax, qword [0x004f0c48]
mov rcx, qword [rax + rbx + 8]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4757b3
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x475777
sub eax, 4
and eax, 0xfffffffb
je 0x475777
add rbx, qword [0x004f0c48]
mov r8d, 0x40
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
mov r9, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x47579f
add dword [0x004f0c44], 1
mov r8, rbp
mov rdx, rdi
mov rcx, rsi
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sub.msvcrt.dll_memcpy
xor ebx, ebx
jmp 0x4756d7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00475610
mov rax, qword [0x004f0c48]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 8]
call fcn.00475610
lea rcx, str.Address__p_has_no_image_section
mov rdx, rsi
call fcn.00475610
nop

Function at 0x475f50
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004f0f20]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004f0f00]
test rbx, rbx
je 0x475fa4
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x475f9b
test rsi, rsi
je 0x475f9b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x475f80
lea rcx, [0x004f0f20]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x4762e0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x004e1aa0]
xor edx, edx
mov r8, rcx
cmp word [r9], 0x5a4d
je 0x476300
mov rax, rdx
add rsp, 0x28
ret
mov rcx, r9
call fcn.004761c0
test eax, eax
je 0x4762f8
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add rax, r9
movzx edx, word [rax + 0x14]
lea rdx, [rax + rdx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x47635d
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
cmp rcx, r8
mov rax, r8
jb 0x476354
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x4762f8
add rdx, 0x28
cmp rdx, r9
jne 0x476340
xor edx, edx
mov rax, rdx
add rsp, 0x28
ret

Function at 0x476690
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov eax, dword [0x004f0f08]
xor esi, esi
mov ebp, ecx
mov rdi, rdx
test eax, eax
jne 0x475fe4
mov eax, esi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov edx, 0x18
mov ecx, 1
call sub.msvcrt.dll_calloc
test rax, rax
mov rbx, rax
je 0x476038
mov dword [rax], ebp
mov qword [rax + 8], rdi
lea rcx, [0x004f0f20]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x004f0f00]
lea rcx, [0x004f0f20]
mov qword [0x004f0f00], rbx
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov esi, 0xffffffff
jmp 0x475fd9
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
mov rbx, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x4766c0
mov rdx, rbx
mov ecx, eax
mov dword [rsi], eax
add rsp, 0x28
pop rbx
pop rsi
jmp 0x4839d0
add rsp, 0x28
pop rbx
pop rsi
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
test rdx, rdx
je 0x4839e0
jmp 0x475fc0
xor eax, eax
ret

Function at 0x4766f0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov ebx, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, ebx
mov esi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x476720
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x476735
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x477000
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 0x47718c
cmp byte [rbx], 0
je 0x477154
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x477170
test al, 0x10
je 0x477154
lea rdi, [rsp + 0x20]
mov r8d, 0x104
mov rdx, rbx
mov rcx, rdi
mov rsi, rdi
call sub.msvcrt.dll__fullpath
mov edx, dword [rsi]
add rsi, 4
lea eax, [rdx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x47705e
mov edx, eax
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea rdx, [rsi + 2]
mov ecx, eax
cmove rsi, rdx
add cl, al
sbb rsi, 3
sub rsi, rdi
lea rcx, [rsi + 0x24b]
call sub.msvcrt.dll_malloc
test rax, rax
mov rbx, rax
je 0x47717f
lea r9, [rax + 0x244]
lea rbp, [rsi + 1]
mov rdx, rdi
mov rcx, r9
mov r8, rbp
call sub.msvcrt.dll_memcpy
cmp byte [rbx + 0x244], 0
mov r9, rax
je 0x4770f0
movzx eax, byte [rbx + rsi + 0x243]
cmp al, 0x2f
je 0x4770f0
cmp al, 0x5c
je 0x4770f0
mov r8d, 0x5c
mov word [r9 + rsi], r8w
mov rsi, rbp
mov eax, 0x2a
xor edx, edx
xor ecx, ecx
mov word [r9 + rsi], ax
mov word [rbx + 0x12c], dx
lea rdx, [rbx + 0x130]
mov word [rbx + 0x12e], cx
xor eax, eax
mov ecx, 0x20
mov rdi, rdx
mov qword [rbx + 0x238], 0xffffffffffffffff
mov dword [rbx + 0x240], 0
mov dword [rbx + 0x128], 0
rep stosq qword [rdi], rax
mov dword [rdi], 0
mov rax, rbx
add rsp, 0x138
pop rbx
pop rsi
pop rdi
pop rbp
ret
xor ebx, ebx
call sub.msvcrt.dll__errno
mov dword [rax], 0x14
mov rax, rbx
add rsp, 0x138
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 2
jmp 0x477145
call sub.msvcrt.dll__errno
mov dword [rax], 0xc
jmp 0x477145
call sub.msvcrt.dll__errno
mov dword [rax], 0xe
jmp 0x477145
Function at 0x47c360
Capabilities:
Query environment variable

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12d, 1
sub r8d, 1
mov edi, ecx
mov ecx, 0x66666667
mov eax, r8d
mov rbp, rdx
movsxd rsi, r8d
imul ecx
sar r8d, 0x1f
mov rbx, r9
mov ecx, edx
sar ecx, 2
sub ecx, r8d
je 0x47c3b5
mov r8d, 0x66666667
nop dword [rax]
mov eax, ecx
sar ecx, 0x1f
add r12d, 1
imul r8d
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x47c3a0
mov edx, dword [rbx + 0x2c]
cmp edx, 0xffffffff
je 0x47c430
mov ecx, dword [rbx + 0xc]
cmp r12d, edx
mov r9, rbx
cmovl r12d, edx
mov r8d, 1
lea edx, [r12 + 2]
mov eax, ecx
sub eax, edx
cmp ecx, edx
mov edx, 0xffffffff
cmovle eax, edx
mov ecx, edi
mov rdx, rbp
mov dword [rbx + 0xc], eax
add r12d, 1
call fcn.0047bc20
mov ecx, dword [rbx + 8]
mov eax, dword [rbx + 0x2c]
mov rdx, rbx
mov dword [rbx + 0x10], eax
mov eax, ecx
and ecx, 0x20
or eax, 0x1c0
or ecx, 0x45
mov dword [rbx + 8], eax
call fcn.0047b7d0
add dword [rbx + 0xc], r12d
mov rdx, rbx
mov rcx, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.0047c090
mov eax, dword [0x00489d50]
cmp eax, 0xffffffff
je 0x47c45c
test eax, eax
je 0x47c44c
mov edx, 2
mov dword [rbx + 0x2c], edx
jmp 0x47c3bd
call fcn.00483710
test al, 1
mov edx, 3
jne 0x47c43f
jmp 0x47c444
lea rcx, str.PRINTF_EXPONENT_DIGITS
call sub.msvcrt.dll_getenv
test rax, rax
je 0x47c484
movsx eax, byte [rax]
sub eax, 0x30
cmp eax, 2
setbe al
movzx eax, al
mov dword [0x00489d50], eax
jmp 0x47c43b
xor eax, eax
jmp 0x47c479

Function at 0x4879f0
Capabilities:
Get thread local storage value

Disassembly:
cmp byte [0x00489e34], 0
jne 0x487a01
lea rax, [0x00489e20]
ret
mov ecx, dword [0x00489e30]
jmp fcn.004766f0
Function at 0x2fc4d08c0
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 sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.2fc4d19a0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x2fc4d12c2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4f3108]
test eax, eax
je 0x2fc4d135a
lea rax, [0x2fc4f30e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4f3110]
mov qword [rbp - 8], rax
jmp 0x2fc4d133e
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 0x2fc4d1332
cmp qword [rbp - 0x10], 0
je 0x2fc4d1332
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 0x2fc4d12f8
lea rax, [0x2fc4f30e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4d135b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4d1460
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 0x2fc4d1488
mov eax, 0
jmp 0x2fc4d14d6
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 0x2fc4d14b1
mov eax, 0
jmp 0x2fc4d14d6
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 0x2fc4d14d1
mov eax, 0
jmp 0x2fc4d14d6
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4d14dc
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 0x2fc4d155a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4d1551
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 0x2fc4d1551
mov rax, qword [rbp - 8]
jmp 0x2fc4d156f
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 0x2fc4d1524
mov eax, 0
add rsp, 0x20
pop rbp
ret