joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400291a8
Capabilities:
Create directory
Query environment variable
Set file attributes

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
sub rsp, 0x30
mov rsi, rdx
mov rbx, rcx
and dword [rsp + 0x20], 0
xor eax, eax
mov qword [rcx], rax
call fcn.14000c200
mov rcx, rax
test rax, rax
je 0x140029337
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
call qword [0x140063a18]
add rax, 0x18
mov qword [rbx], rax
mov rcx, rbx
call fcn.14000b7a0
nop
mov dword [rsp + 0x20], 1
mov ecx, 0x400
call fcn.14002a6c0
mov rdi, rax
test rax, rax
je 0x140029305
mov r8d, 0x200
mov rdx, rax
lea rcx, str._LOCALAPPDATA_
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, rdi
call fcn.140033d04
mov r8d, eax
mov rdx, rdi
mov rcx, rbx
call fcn.140010c34
mov rax, qword [rbx]
cmp dword [rax - 0x10], 0
jle 0x1400292fc
lea rcx, [0x140067c80]
call fcn.140033d04
mov r8d, eax
lea rdx, [0x140067c80]
mov rcx, rbx
call fcn.1400148a4
lea rcx, str.Intel
call fcn.140033d04
mov r8d, eax
lea rdx, str.Intel
mov rcx, rbx
call fcn.1400148a4
xor edx, edx
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov r8, rsi
lea rdx, [0x140067c80]
lea rcx, [rsp + 0x60]
call fcn.1400133dc
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
mov rcx, rbx
call fcn.1400148a4
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400292e3
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140063a18]
xor edx, edx
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, 6
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov rcx, rdi
call fcn.140029c24
nop
mov rdx, qword [rsi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14002932c
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140063a18]
mov rax, rbx
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret
mov ecx, 0x80004005
call fcn.1400099c0
int3
Function at 0x1400410a0
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.14002a5f0
sub rsp, rax
mov rax, qword [0x140086e08]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14004cb64
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x1400410ef
mov rax, rbp
jmp 0x1400411f7
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, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x91230]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.14004fe28
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x91230]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x1400411f3
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 0x1400411f3
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.14004fe28
test rax, rax
js 0x1400411f3
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x1400411f3
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x1400411e5
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x1400411e5
cmp byte [rcx], 0xd
jne 0x1400411cb
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x1400411da
cmp byte [rcx + 1], 0xa
jne 0x1400411da
inc rcx
jmp 0x1400411da
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x87450]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x1400411ad
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x1400411f7
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.14002a660
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 0x14004eba4
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
movsxd rbp, ecx
mov r9, r8
mov rax, rbp
lea rcx, [0x140091230]
and eax, 0x3f
mov r10, rbp
sar r10, 6
xor edi, edi
mov rsi, rdx
mov r14, rbp
lea r8, [rax + rax*8]
mov rax, qword [rcx + r10*8]
mov ecx, 4
mov qword [rsp + 0x78], rcx
mov r11, qword [rax + r8*8 + 0x28]
lea r12d, [rcx + 6]
test r9, r9
je 0x14004ec02
cmp word [rdx], r12w
jne 0x14004ec02
or byte [rax + r8*8 + 0x38], cl
jmp 0x14004ec08
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x14004ed63
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x14004ed3e
lea r9, [rcx + 2]
cmp ax, r13w
je 0x14004ec41
mov rcx, r9
jmp 0x14004ec64
cmp r9, rdx
jae 0x14004ec7b
cmp word [r9], r12w
mov eax, 2
cmove rax, qword [rsp + 0x78]
add rcx, rax
mov eax, r12d
cmp word [r9], r12w
cmovne ax, r13w
mov word [rbx], ax
mov r9d, 0x1a
add rbx, 2
cmp rcx, rdx
jb 0x14004ec25
jmp 0x14004ed63
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14004ed38
cmp dword [rsp + 0x80], edi
je 0x14004ed38
mov rdx, r14
lea r11, [0x140091230]
sar rdx, 6
and r14d, 0x3f
mov rax, qword [r11 + rdx*8]
lea r8, [r14 + r14*8]
test byte [rax + r8*8 + 0x38], 0x48
je 0x14004ed11
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x14004ece4
mov word [rbx], r12w
jmp 0x14004ed5f
mov word [rbx], r13w
mov word [rsp + 0x78], ax
mov rax, qword [r11 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, 2
jl 0x14004eced
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x14004ed5f
cmp word [rsp + 0x70], r12w
jne 0x14004ed1e
cmp rbx, rsi
je 0x14004ecde
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.14004fe30
cmp word [rsp + 0x70], r12w
je 0x14004ed63
mov word [rbx], r13w
jmp 0x14004ed5f
lea r11, [0x140091230]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x14004ed5b
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x14004ed63
mov word [rbx], r9w
add rbx, 2
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x14004f760
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
mov rsi, rcx
test rcx, rcx
jne 0x14004f792
call fcn.1400337d8
mov dword [rax], 0x16
call fcn.14003366c
jmp 0x14004f8b1
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x14004f8b1
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x14004f8b1
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x14004f7c1
lock or dword [rcx + 0x14], 0x10
jmp 0x14004f8b1
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x14004f7d5
call fcn.1400547b0
mov rdi, qword [rsi + 8]
mov rcx, rsi
mov ebx, dword [rsi + 0x20]
mov qword [rsi], rdi
call fcn.14004cb64
mov r8d, ebx
mov rdx, rdi
mov ecx, eax
call fcn.14004f050
mov dword [rsi + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 1
jbe 0x14004f89f
mov eax, dword [rsi + 0x14]
or edi, 0xffffffff
test al, 6
jne 0x14004f86a
mov rcx, rsi
call fcn.14004cb64
cmp eax, edi
je 0x14004f855
mov rcx, rsi
call fcn.14004cb64
cmp eax, 0xfffffffe
je 0x14004f855
mov rcx, rsi
call fcn.14004cb64
movsxd rbx, eax
lea r14, [0x140091230]
mov rcx, rsi
sar rbx, 6
call fcn.14004cb64
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rbx*8]
lea rdx, [rax + rcx*8]
jmp 0x14004f85c
lea rdx, [0x140087240]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x14004f86a
lock or dword [rsi + 0x14], 0x20
cmp dword [rsi + 0x20], 0x200
jne 0x14004f88e
mov eax, dword [rsi + 0x14]
shr eax, 6
test al, 1
je 0x14004f88e
mov eax, dword [rsi + 0x14]
shr eax, 8
test al, 1
jne 0x14004f88e
mov dword [rsi + 0x20], 0x1000
mov rax, qword [rsi]
add dword [rsi + 0x10], edi
movzx edi, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x14004f8b4
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rsi + 0x14], eax
and dword [rsi + 0x10], 0
or edi, 0xffffffff
mov rbx, qword [rsp + 0x30]
mov eax, edi
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop r14
ret
Function at 0x14004f8cc
Capabilities:
Read file on windows

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, 0x20
mov rbx, rcx
test rcx, rcx
jne 0x14004f5ee
call fcn.1400337d8
mov dword [rax], 0x16
call fcn.14003366c
jmp 0x14004f73e
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x14004f73e
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x14004f73e
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x14004f61d
lock or dword [rcx + 0x14], 0x10
jmp 0x14004f73e
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x14004f631
call fcn.1400547b0
mov ebp, dword [rbx + 0x10]
cmp ebp, 1
jne 0x14004f641
mov rax, qword [rbx]
mov r14b, byte [rax]
jmp 0x14004f644
xor r14b, r14b
mov rsi, qword [rbx + 8]
mov rcx, rbx
mov edi, dword [rbx + 0x20]
mov qword [rbx], rsi
call fcn.14004cb64
mov r8d, edi
mov rdx, rsi
mov ecx, eax
call fcn.14004f050
mov dword [rbx + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 2
jbe 0x14004f72c
mov eax, dword [rbx + 0x14]
test al, 6
jne 0x14004f6d7
mov rcx, rbx
call fcn.14004cb64
cmp eax, 0xffffffff
je 0x14004f6c2
mov rcx, rbx
call fcn.14004cb64
cmp eax, 0xfffffffe
je 0x14004f6c2
mov rcx, rbx
call fcn.14004cb64
movsxd rdi, eax
lea rsi, [0x140091230]
mov rcx, rbx
sar rdi, 6
call fcn.14004cb64
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [rsi + rdi*8]
lea rdx, [rax + rcx*8]
jmp 0x14004f6c9
lea rdx, [0x140087240]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x14004f6d7
lock or dword [rbx + 0x14], 0x20
cmp dword [rbx + 0x20], 0x200
jne 0x14004f6fb
mov eax, dword [rbx + 0x14]
shr eax, 6
test al, 1
je 0x14004f6fb
mov eax, dword [rbx + 0x14]
shr eax, 8
test al, 1
jne 0x14004f6fb
mov dword [rbx + 0x20], 0x1000
mov rdx, qword [rbx]
cmp ebp, 1
jne 0x14004f719
movzx ecx, byte [rdx]
dec dword [rbx + 0x10]
shl cx, 8
movzx eax, r14b
or cx, ax
inc rdx
jmp 0x14004f724
movzx ecx, word [rdx]
add dword [rbx + 0x10], 0xfffffffe
add rdx, 2
mov qword [rbx], rdx
movzx eax, cx
jmp 0x14004f743
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rbx + 0x14], eax
and dword [rbx + 0x10], 0
mov eax, 0xffff
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
jmp 0x14004f5b8
Function at 0x1400550e8
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 0x14005516f
mov rsi, rbx
cmp word [rax], bp
je 0x14005512e
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140055118
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140055114
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14004ac54
mov rdi, rax
test rax, rax
je 0x14005515c
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14002ee00
mov rbp, rdi
xor ecx, ecx
call fcn.14004a53c
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 0x14005ba9c
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.14004fe30
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14004fe30
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14005bbec
cmp rax, 0xffffffffffffffff
je 0x14005bbec
xor edi, edi
test rbp, rbp
jle 0x14005bb97
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14004d0e4
mov rbx, rax
test rax, rax
jne 0x14005bb24
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14005bb8d
mov edx, 0x8000
mov ecx, r14d
call fcn.1400450e4
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.1400508b0
cmp eax, 0xffffffff
je 0x14005bb6d
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14005bb34
mov edx, r15d
mov ecx, r14d
call fcn.1400450e4
jmp 0x14005bb8d
cmp byte [rsi + 0x38], dil
je 0x14005bb84
cmp dword [rsi + 0x34], 5
jne 0x14005bb84
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14005bb8d
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14004a53c
jmp 0x14005bc00
jns 0x14005bc00
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14004fe30
cmp rax, 0xffffffffffffffff
jne 0x14005bbb8
cmp byte [rsi + 0x30], dil
je 0x14005bc00
mov edi, dword [rsi + 0x2c]
jmp 0x14005bc00
mov ecx, r14d
call fcn.140055ac8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14005bc00
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x14005bc00
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14005bbf9
mov eax, dword [rsi + 0x2c]
jmp 0x14005bbfe
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14004fe30
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x40b170
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004ce624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40b2f8
mov rax, qword [0x004ce628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40b1bc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40b245
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40b1a0
mov rcx, rbx
call fcn.0040be10
test rax, rax
mov r12, rax
je 0x40b32d
mov rax, qword [0x004ce628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.0040bf40
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004ce628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40b310
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40b23e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40b2a0
add dword [0x004ce624], 1
cmp edi, 8
jae 0x40b273
test dil, 4
jne 0x40b2e4
test edi, edi
je 0x40b268
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40b2ff
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x40b268
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x40b28c
jmp 0x40b268
add rsi, qword [0x004ce628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40b23e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.004a1110
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x40b268
xor esi, esi
jmp 0x40b1c7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40b268
mov rax, qword [0x004ce628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.004a1110
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.004a1110
nop
nop dword [rax]

Function at 0x40ba80
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004ce900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004ce8e0]
test rbx, rbx
je 0x40bad4
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 0x40bacb
test rsi, rsi
je 0x40bacb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40bab0
lea rcx, [0x004ce900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x40be10
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004aa410]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40be7d
mov rcx, r8
call fcn.0040bcf0
test eax, eax
je 0x40be7d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40be7d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x40be74
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40be7f
add rax, 0x28
cmp rax, r9
jne 0x40be60
xor eax, eax
add rsp, 0x28
ret

Function at 0x418780
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x004a2148], eax
je 0x41879a
add rsp, 0x28
ret
call sub.msvcrt.dll_abort
nop

Function at 0x418ca0
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x418cc3
call fcn.00418640
cmp eax, 1
je 0x418cce
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret
lea rdi, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
lea rbx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rbx + 0x27]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x418d45
mov eax, 0x28
jmp 0x418d2a
add rax, 1
cmp rax, 0x6b
je 0x418d37
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x418d20
cmp eax, 0x6a
jne 0x418d4a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov edx, 0x27
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
jmp 0x418d37
Function at 0x418df0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x004cf3e0], 1
je 0x418e06
call fcn.00418d60
mov ecx, dword [0x004a2148]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x418e30
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.00418be0
cmp qword [0x004d2050], 0
mov rsi, rax
je 0x418e1a
test rax, rax
je 0x418e1a
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
mov dword [rsi + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
lea rcx, [rsi + 0x68]
mov qword [rsi + 0x38], 0xffffffffffffffff
mov qword [rsi + 0x30], rax
call fcn.00418ca0
mov rbx, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsi + 0xb8], 0
mov qword [rsi + 0x28], 0
call rbx
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, rax
call rbx
mov dword [rsp + 0x30], 2
mov r8, rbp
mov rdx, rdi
mov dword [rsp + 0x28], 0
lea r9, [rsi + 0x28]
mov rcx, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x418f20
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rdx, rsi
mov ecx, dword [0x004a2148]
mov dword [rsi + 0xbc], 0
mov dword [rsi + 0xc0], eax
movzx eax, byte [rsi + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rsi + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x418f20
mov rbx, rsi
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sub.msvcrt.dll_abort
nop
nop word cs:[rax + rax]
Function at 0x46c110
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [sym.imp.msvcrt.dll__errno]
mov rbp, rcx
mov rdi, rdx
mov esi, r8d
jmp 0x46c138
call r12
cmp dword [rax], 4
jne 0x46c156
mov rcx, rbp
call fcn.0046c010
mov r8d, esi
mov rdx, rdi
mov ecx, eax
call sub.msvcrt.dll__read
movsxd rbx, eax
cmp rbx, 0xffffffffffffffff
je 0x46c130
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x4a1110
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp fcn.00401510
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.00416e30
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.00416e30
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
jmp 0x401530
Function at 0x140003310
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x14000c010]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000333d
xor eax, eax
jmp 0x1400034a9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140003377
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140003377
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x1400034a9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x14000349c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400033ba
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x1400033e5
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x1400034a1
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140003454
sub eax, 1
je 0x140003454
cmp eax, 2
jne 0x14000349c
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x1400034a1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140003482
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x14000349c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x1400034a1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400057b0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret