joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1800285f0
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.1800136f0
sub rsp, rax
mov rax, qword [0x180048040]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.180023048
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x18002863f
mov rax, rbp
jmp 0x180028747
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x180000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x4a3a0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.180029710
mov r13, rax
lea rax, [0x180000000]
mov rcx, qword [rax + rbx*8 + 0x4a3a0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x180028743
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 0x180028743
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.180029710
test rax, rax
js 0x180028743
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x180028743
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x180028735
lea r8, [0x180000000]
cmp rcx, rdx
jae 0x180028735
cmp byte [rcx], 0xd
jne 0x18002871b
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x18002872a
cmp byte [rcx + 1], 0xa
jne 0x18002872a
inc rcx
jmp 0x18002872a
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x48460]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x1800286fd
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x180028747
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.180012db0
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 0x180028968
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x18002897e
mov al, 1
jmp 0x1800289de
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x18002898f
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1800289dc
mov ecx, dword [rcx + 0x18]
nop
call fcn.18002fd48
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1800289dc
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1800289dc
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1800289dc
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1800289de
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x180028ab0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x18004a3a0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x180028b07
cmp word [rdx], r13w
jne 0x180028b07
or byte [rax + rdi*8 + 0x38], cl
jmp 0x180028b0c
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x180028c31
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x180028c52
lea r9, [rdx + 2]
cmp cx, r11w
je 0x180028b45
mov rdx, r9
mov word [rbx], cx
jmp 0x180028b6c
cmp r9, r8
jae 0x180028b7c
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x180028b26
jmp 0x180028c31
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180028c26
cmp dword [rsp + 0x80], esi
je 0x180028c26
lea r8, [0x18004a3a0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x180028bfe
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x180028bce
mov word [rbx], r13w
jmp 0x180028c2e
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x180028bdb
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x180028c2e
cmp word [rsp + 0x70], r13w
jne 0x180028c0b
cmp rbx, r14
je 0x180028bc8
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.180029718
cmp word [rsp + 0x70], r13w
je 0x180028c31
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x18004a3a0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x180028c2b
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x180028c31
Function at 0x18002b5e0
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x18002b610
xor eax, eax
jmp 0x18002b6d3
mov rbp, rbx
cmp word [rax], si
je 0x18002b635
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x18002b61c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18002b618
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.180029cc8
movsxd r14, eax
test eax, eax
jne 0x18002b673
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18002b609
mov rcx, r14
call fcn.180021dec
mov rdi, rax
test rax, rax
jne 0x18002b68c
xor ecx, ecx
call fcn.180021db0
jmp 0x18002b668
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.180029cc8
test eax, eax
jne 0x18002b6bd
mov rcx, rdi
call fcn.180021db0
jmp 0x18002b6c7
xor ecx, ecx
call fcn.180021db0
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x18002f6e8
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.180023598
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x18002f789
cmp ebx, dword [rsp + 0x30]
je 0x18002f782
test esi, esi
je 0x18002f782
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x18002f75d
sub r8w, 0x61
cmp r8w, 0x19
ja 0x18002f76a
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x18002f747
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x18002f76e
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x18002f78b
mov eax, 1
jmp 0x18002f78b
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x180032600
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x180032628
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x180032628
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x14005de20
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x14005de2d
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x14005de3d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x14005de25
lea eax, [rcx + 1]
jmp 0x14005de4b
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x14005de5e
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x14005de44
sub eax, 3
jb 0x14005de7e
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x14005decd
sar eax, 1
movsxd rbp, eax
jb 0x14005deb4
jmp 0x14005de8c
add ebx, ebx
jne 0x14005de8a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x14005deb4
inc ecx
add ebx, ebx
jne 0x14005de9a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x14005deb4
call r11
adc ecx, ecx
add ebx, ebx
jne 0x14005dead
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x14005de9c
add ecx, 2
jmp 0x14005deb9
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.14005dde2
jmp 0x14005de2d
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x3b400
mov dl, 0x11
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x14005df19
cmp rsi, rcx
jae 0x14005df21
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x14005df00
cmp al, 0x8f
ja 0x14005df00
cmp byte [rsi - 2], 0xf
je 0x14005df06
sub al, 0xe8
cmp al, 1
ja 0x14005deea
cmp rsi, rcx
jae 0x14005df21
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x14005def0
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x14005df21
lodsb al, byte [rsi]
jmp 0x14005df00
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x5a000]
mov eax, dword [rdi]
or eax, eax
je 0x14005df7e
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x5e3e4]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x14005df2e
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x14005df78
mov qword [rbx], rax
add rbx, 8
jmp 0x14005df4e
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x14005dfb8
cmp al, 0xef
ja 0x14005dfaa
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x14005df8a
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
jmp 0x14005df99
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x237]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x14005e00c
sub rsp, 0xffffffffffffff80
jmp 0x140020eac
Function at 0x140001480
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140023a30]
mov dword [rax], 1
mov rax, qword [0x140023a40]
mov dword [rax], 1
mov rax, qword [0x140023a50]
mov dword [rax], 1
mov rax, qword [0x140023a20]
mov dword [rax], 1
mov rax, qword [0x1400238d0]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400014de
mov eax, 0
jmp 0x14000158b
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 0x14000150a
mov eax, 0
jmp 0x14000158b
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 0x140001530
cmp eax, 0x20b
je 0x140001557
jmp 0x140001586
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x140001543
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x14000158b
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x140001572
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x14000158b
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x1400041b7
Capabilities:
Read file on windows

Disassembly:
push r13
push rbx
sub rsp, 0x38
mov r13, rcx
mov rcx, rdx
mov edx, 1
mov rbx, r8
mov r9, r13
call sym.fread
cmp rbx, rax
je 0x1400041eb
mov rcx, r13
mov qword [rsp + 0x28], rax
call sym.checkErr__stdZsyncio_u165
mov rax, qword [rsp + 0x28]
add rsp, 0x38
pop rbx
pop r13
ret

Function at 0x1400041f3
Capabilities:
Read file on windows

Disassembly:
sub rsp, 0x28
mov r10, rcx
mov rax, r8
mov rcx, r9
mov r8, qword [rsp + 0x50]
test r9, r9
js 0x14000421b
cmp r9, rax
jge 0x14000421b
add rdx, r9
mov rcx, r10
add rsp, 0x28
jmp sym.readBuffer__stdZsyncio_u168
lea rdx, [rax - 1]
call sym.raiseIndexError2
xor eax, eax
add rsp, 0x28
ret

Function at 0x1400044e0
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
sub rsp, 0x28
xor r8d, r8d
mov r13, rcx
mov r12, rdx
test rdx, rdx
je 0x140004501
mov rcx, rdx
call sym.strlen
mov r8, rax
mov rcx, r12
mov r9, r13
mov edx, 1
call sym.fwrite
mov rcx, r13
add rsp, 0x28
pop r12
pop r13
jmp sym.fflush

Function at 0x140004681
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
sub rsp, 0x38
mov qword [rsp + 0x28], rdx
mov r13, rcx
mov ecx, 2
call qword [sym.__acrt_iob_func]
mov r8, qword [rsp + 0x28]
mov rcx, r13
mov edx, 1
mov r12, rax
mov r9, rax
call sym.fwrite
mov rcx, r12
add rsp, 0x38
pop r12
pop r13
jmp sym.fflush
Function at 0x140009570
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
sub rsp, 0x38
cmp qword [0x14002a150], 0
jne 0x14000958f
add rsp, 0x38
pop r12
pop r13
jmp sym.writeToStdErr__system_u3961
lea r13, [rsp + 0x20]
mov rdx, rcx
mov rcx, r13
call sym.cstrToNimstr
mov r12, qword [rsp + 0x28]
mov rcx, r13
call qword [0x14002a150]
test r12, r12
je 0x1400095c2
test byte [r12 + 7], 0x40
jne 0x1400095c2
mov rcx, r12
call sym.deallocImpl__system_u1765
lea rcx, [0x140020300]
call sym.__emutls_get_address
cmp byte [rax], 0
je 0x1400095fc
mov byte [rax], 0
lea rcx, [0x140020200]
call sym.__emutls_get_address
xor r8d, r8d
mov rcx, rax
mov rax, qword [rax]
mov rdx, qword [rax + 0x38]
add rsp, 0x38
pop r12
pop r13
jmp sym.eqcopy___stdZtypedthreads_u171
add rsp, 0x38
pop r12
pop r13
ret

Function at 0x140009605
Capabilities:
Write file on windows

Disassembly:
mov rdx, qword [rcx]
mov rax, qword [rcx + 8]
lea rcx, [0x140021998]
test rdx, rdx
je 0x14000961c
lea rcx, [rax + 8]
jmp sym.showErrorMessage__system_u3966

Function at 0x14000a492
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
lea rax, str.echoBinSafe
lea rdi, [0x1400219e8]
xor r12d, r12d
lea r13, [0x14002a120]
lea r15, str.E:_tools_nim_2.0.4lib_systemiterators.nim
lea r14, [0x140020300]
mov rsi, rcx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x48], rax
mov rbx, rdx
mov qword [rsp + 0x58], rdi
lea rbp, [rsp + 0x30]
mov qword [rsp + 0x50], 0
mov word [rsp + 0x60], 0
call sym.nimFrame.constprop.0_7
mov rcx, r13
mov qword [rsp + 0x50], 0xac5
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp r12, rbx
jl 0x14000a573
mov rbx, qword [sym.__acrt_iob_func]
mov qword [rsp + 0x58], rdi
mov ecx, 1
mov qword [rsp + 0x50], 0xae1
call rbx
mov r8d, 1
mov edx, 1
lea rcx, [0x1400219db]
mov r9, rax
call sym.fwrite
mov ecx, 1
mov qword [rsp + 0x50], 0xae2
call rbx
mov rcx, rax
call sym.fflush
mov rcx, r13
mov qword [rsp + 0x50], 0xae6
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14000a5f3
mov qword [rsp + 0x50], 0xac6
mov qword [rsp + 0x58], rdi
test r12, r12
jns 0x14000a594
lea rdx, [rbx - 1]
mov rcx, r12
call sym.raiseIndexError2
jmp 0x14000a5f3
mov rdx, r12
mov ecx, 1
shl rdx, 4
add rdx, rsi
mov qword [rsp + 0x28], rdx
call qword [sym.__acrt_iob_func]
mov rdx, qword [rsp + 0x28]
xor r8d, r8d
mov rcx, rax
movups xmm0, xmmword [rdx]
mov rdx, rbp
movaps xmmword [rsp + 0x30], xmm0
call sym.writeWindows__system_u9040
mov rcx, r14
call sym.__emutls_get_address
cmp byte [rax], 0
jne 0x14000a5f3
add r12, 1
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x50], 0x10
jno 0x14000a509
call sym.raiseOverflow
call sym.popFrame_7
nop
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x14000ce70
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 sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov r8, rbx
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x14000daa2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x14002a2c8]
test eax, eax
je 0x14000db3a
lea rax, [0x14002a2a0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x14002a2d0]
mov qword [rbp - 8], rax
jmp 0x14000db1e
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 0x14000db12
cmp qword [rbp - 0x10], 0
je 0x14000db12
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 0x14000dad8
lea rax, [0x14002a2a0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14000db3b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x14000dc40
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 0x14000dc68
mov eax, 0
jmp 0x14000dcb6
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 0x14000dc91
mov eax, 0
jmp 0x14000dcb6
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 0x14000dcb1
mov eax, 0
jmp 0x14000dcb6
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x14000dcbc
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 0x14000dd3a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x14000dd31
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 0x14000dd31
mov rax, qword [rbp - 8]
jmp 0x14000dd4f
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 0x14000dd04
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x1400157a4
Capabilities:
Print debug messages

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x90
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
cmp qword [rbp + 0x10], 0
je 0x1400158ee
mov rcx, qword [rbp + 0x10]
call sym.pthread_spin_destroy
cmp eax, 1
jne 0x1400158e1
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rdx
movabs rax, 0x6b5f6e6970732070
movabs rdx, 0x20726f6620737965
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rdx
movabs rax, 0x20646165726874
mov edx, 0
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rdx
mov qword [rbp - 0x40], 0
mov qword [rbp - 0x38], 0
mov qword [rbp - 0x30], 0
mov qword [rbp - 0x28], 0
mov qword [rbp - 0x20], 0
mov qword [rbp - 0x18], 0
mov qword [rbp - 0x10], 0
mov word [rbp - 8], 0
mov byte [rbp - 6], 0
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call rax
mov ecx, eax
lea rax, [rbp - 0x70]
add rax, 0x27
mov r8d, 0xa
mov rdx, rax
mov rax, qword [sym.imp.msvcrt.dll__ultoa]
call rax
mov dword [rbp - 4], 0x27
jmp 0x140015897
add dword [rbp - 4], 1
mov eax, dword [rbp - 4]
cdqe
movzx eax, byte [rbp + rax - 0x70]
test al, al
je 0x1400158ad
mov eax, dword [rbp - 4]
cmp eax, 0x69
jbe 0x140015893
mov eax, dword [rbp - 4]
cmp eax, 0x69
ja 0x1400158cc
mov eax, dword [rbp - 4]
cdqe
mov byte [rbp + rax - 0x70], 0xa
mov eax, dword [rbp - 4]
add eax, 1
cdqe
mov byte [rbp + rax - 0x70], 0
lea rax, [rbp - 0x70]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call rax
call sym.abort
mov rax, qword [rbp + 0x10]
mov rdx, qword [rbp + 0x18]
mov qword [rax], rdx
jmp 0x1400158ef
nop
add rsp, 0x90
pop rbp
ret
Function at 0x14001690b
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [sym.imp.KERNEL32.dll_TlsAlloc]
call rax
mov dword [0x140020580], eax
mov eax, dword [0x140020580]
cmp eax, 0xffffffff
jne 0x140016932
call sym.abort
nop
add rsp, 0x20
pop rbp
ret

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

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov qword [rbp - 8], 0xffffffffffffffff
lea rax, [sym.pthread_tls_init]
mov rdx, rax
lea rax, [0x14002ad50]
mov rcx, rax
call sym._pthread_once_raw
mov eax, dword [0x140020580]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x140016b38
mov rax, qword [rbp - 0x10]
jmp 0x140016c98
call sym.pop_pthread_mem
mov qword [rbp - 0x10], rax
mov rax, qword [sym.__dyn_tls_pthread]
test rax, rax
je 0x140016b54
cmp qword [rbp - 0x10], 0
jne 0x140016b5e
mov eax, 0
jmp 0x140016c98
mov rax, qword [rbp - 0x10]
mov dword [rax + 0x44], 1
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call rax
mov rdx, qword [rbp - 0x10]
mov dword [rdx + 0x70], eax
mov r9d, 0
mov r8d, 0
mov edx, 1
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateEventA]
call rax
mov rdx, qword [rbp - 0x10]
mov qword [rdx + 0x30], rax
mov rax, qword [rbp - 0x10]
mov qword [rax + 0x38], 0xffffffffffffffff
mov rax, qword [rbp - 0x10]
lea rcx, [rax + 0x68]
mov rax, qword [rbp - 8]
mov rdx, rax
call sym.replace_spin_keys
mov rax, qword [rbp - 0x10]
mov dword [rax + 0xb8], 0
mov rax, qword [rbp - 0x10]
mov qword [rax + 0x28], 0
mov rax, qword [rbp - 0x10]
lea rdi, [rax + 0x28]
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov rsi, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentThread]
call rax
mov rbx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9, rdi
mov r8, rsi
mov rdx, rbx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_DuplicateHandle]
call rax
test eax, eax
jne 0x140016c39
call sym.abort
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetThreadPriority]
call rax
mov rdx, qword [rbp - 0x10]
mov dword [rdx + 0xc0], eax
mov rax, qword [rbp - 0x10]
mov dword [rax + 0xbc], 0
mov rax, qword [rbp - 0x10]
movzx edx, byte [rax + 0x40]
and edx, 0xffffffcf
or edx, 0x10
mov byte [rax + 0x40], dl
mov eax, dword [0x140020580]
mov rdx, qword [rbp - 0x10]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsSetValue]
call rax
test eax, eax
jne 0x140016c94
call sym.abort
mov rax, qword [rbp - 0x10]
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
ret