joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4a0f90
Capabilities:
Query environment variable
Query or enumerate registry value
Write file on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rcx, str.GLUT_DIALS_SERIAL
call sub.msvcrt.dll_getenv
test rax, rax
je 0x4a1110
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
mov qword [rsp + 0x74], 0
mov qword [rsp + 0x7c], 0
mov edx, 0xc0000000
mov qword [rsp + 0x84], 0
mov dword [rsp + 0x70], 0x1c
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
test rax, rax
mov rbx, rax
je 0x4a1184
mov ecx, 0x38
call sub.msvcrt.dll_malloc
mov ecx, 6
lea rbp, [rax + 8]
mov rsi, rax
xor eax, eax
lea rdx, [rsi + 0x1c]
mov rdi, rbp
rep stosq qword [rdi], rax
lea rdi, [rsp + 0x70]
mov rcx, rbx
mov qword [rsi], rbx
call qword [sym.imp.KERNEL32.dll_GetCommState]
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetCommTimeouts]
lea rbp, [rsp + 0x50]
mov rdx, rdi
mov dword [rsp + 0x70], 0x1c
lea rcx, str.96_n_8_1
call qword [sym.imp.KERNEL32.dll_BuildCommDCBA]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCommState]
mov rdx, rbp
mov rcx, rbx
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov dword [rsp + 0x58], 1
mov dword [rsp + 0x60], 1
call qword [sym.imp.KERNEL32.dll_SetCommTimeouts]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov r9, rdi
mov rdx, rbp
mov rcx, qword [rsi]
mov r8d, 1
mov qword [0x00c88740], rsi
mov byte [rsp + 0x50], 0x20
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor r8d, r8d
mov ecx, 0xa
lea rdx, [0x004a0d60]
call fcn.0049ecc0
mov rax, qword [0x005d3a70]
mov byte [rax + 0xb0], 1
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov dword [rsp + 0x4c], 0x100
lea r8, [rsp + 0x70]
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x50], 1
lea rdx, str.SOFTWAREFreeGLUT
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4a10fa
lea rax, [rsp + 0x4c]
xor r8d, r8d
mov rcx, qword [rsp + 0x70]
lea rbx, [0x00c88640]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x50]
lea rdx, str.DialboxSerialPort
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, qword [rsp + 0x70]
test eax, eax
jne 0x4a11a0
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rax, rbx
jmp 0x4a0fb0
mov qword [0x00c88740], 0
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
ret
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4a10fa

Function at 0x4a1200
Capabilities:
Query environment variable
Query or enumerate registry value
Write file on windows

Disassembly:
mov rax, qword [0x005d3a70]
cmp byte [rax + 0xb0], 0
je 0x4a1211
ret
jmp fcn.004a0f90
Function at 0x4a1290
Capabilities:
Query or enumerate registry value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x258
cmp byte [rcx + 0x1d0], 0
mov r13, rcx
mov r12, rdx
je 0x4a12d0
xor eax, eax
add rsp, 0x258
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rax, str.CurrentJoystickSettings
mov edx, 0x100
mov rsi, qword [sym.imp.msvcrt.dll__snprintf]
lea rbx, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rbp, [rsp + 0x48]
lea rax, [rcx + 0x70]
mov rcx, rbx
lea r9, str.SystemCurrentControlSetControlMediaResourcesJoystick
mov qword [rsp + 0x20], rax
lea r8, str._s_s_s
call rsi
xor r8d, r8d
mov qword [rsp + 0x20], rbp
mov r9d, 1
mov rdx, rbx
mov rcx, 0xffffffff80000002
mov rdi, qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
call rdi
test eax, eax
jne 0x4a12b2
mov eax, dword [r13 + 0x1c8]
lea rdx, str.OEMName
mov rcx, rbx
mov dword [rsp + 0x44], 0x100
mov qword [rsp + 0x20], rdx
lea r15, [rsp + 0x44]
mov edx, 0x100
lea r8, str.Joystick_d_s
lea r9d, [rax + 1]
call rsi
lea r10, [rsp + 0x150]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r10
mov rdx, rbx
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x38], r10
mov r14, qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov qword [rsp + 0x28], r15
call r14
mov rcx, qword [rsp + 0x48]
mov dword [rsp + 0x34], eax
mov r13, qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call r13
mov eax, dword [rsp + 0x34]
test eax, eax
jne 0x4a12b2
mov r10, qword [rsp + 0x38]
lea r9, str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
mov edx, 0x100
mov rcx, rbx
lea r8, str._s_s
mov qword [rsp + 0x20], r10
call rsi
xor r8d, r8d
mov qword [rsp + 0x20], rbp
mov r9d, 1
mov rdx, rbx
mov rcx, 0xffffffff80000002
call rdi
test eax, eax
jne 0x4a12b2
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x28], r15
lea rdx, str.OEMName
mov dword [rsp + 0x44], pe_nt_image_headers64
mov qword [rsp + 0x20], r12
call r14
mov rcx, qword [rsp + 0x48]
mov ebx, eax
call r13
xor eax, eax
test ebx, ebx
sete al
jmp 0x4a12b4

Function at 0x4a2250
Capabilities:
Log keystrokes via polling

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov ecx, 0xa0
mov rsi, qword [sym.imp.USER32.dll_GetKeyState]
mov ebx, 1
call rsi
test ax, ax
js 0x4a227b
mov ecx, 0xa1
call rsi
movsx ebx, ax
shr ebx, 0x1f
mov ecx, 0xa2
call rsi
test ax, ax
jns 0x4a22a2
mov ecx, 0xa4
or ebx, 2
call rsi
test ax, ax
jns 0x4a22c0
or ebx, 4
mov eax, ebx
add rsp, 0x28
pop rbx
pop rsi
ret
mov ecx, 0xa3
call rsi
mov edx, ebx
mov ecx, 0xa4
or edx, 2
test ax, ax
cmovs ebx, edx
call rsi
test ax, ax
js 0x4a2296
mov ecx, 0xa5
call rsi
mov edx, ebx
or edx, 4
test ax, ax
cmovs ebx, edx
mov eax, ebx
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x4a2310
Capabilities:
Write file on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rbx, qword [0x005d3a70]
mov qword [rsp + 0x68], rdx
mov rsi, rcx
mov qword [rsp + 0x70], r8
mov qword [rsp + 0x78], r9
cmp qword [rbx + 0xd0], 0
je 0x4a2355
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x28], rdx
call qword [rbx + 0xd0]
nop
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rax, [rsp + 0x68]
mov ecx, 2
mov rdi, qword [fcn.004c54e0]
mov qword [rsp + 0x28], rax
call rdi
mov r8d, 9
mov edx, 1
lea rcx, str.freeglut
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbp, qword [rbx + 0xa0]
test rbp, rbp
je 0x4a23ac
mov ecx, 2
call rdi
lea rdx, str.__s_:
mov r8, rbp
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov rbp, qword [rsp + 0x28]
mov ecx, 2
call rdi
mov rdx, rsi
mov rcx, rax
mov r8, rbp
call sub.msvcrt.dll_vfprintf
mov ecx, 2
call rdi
mov ecx, 0xa
mov rdx, rax
call sub.msvcrt.dll_fputc
cmp byte [rbx + 0x1c], 0
jne 0x4a23ea
mov ecx, 1
call sub.msvcrt.dll_exit
call fcn.0049ff60
jmp 0x4a23e0

Function at 0x4a2400
Capabilities:
Write file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rbx, qword [0x005d3a70]
mov qword [rsp + 0x58], rdx
mov rsi, rcx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
cmp qword [rbx + 0xd8], 0
je 0x4a2443
lea rdx, [rsp + 0x58]
mov qword [rsp + 0x28], rdx
call qword [rbx + 0xd8]
nop
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
lea rax, [rsp + 0x58]
mov ecx, 2
mov rdi, qword [fcn.004c54e0]
mov qword [rsp + 0x28], rax
call rdi
mov r8d, 9
mov edx, 1
lea rcx, str.freeglut
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbx + 0xa0]
test rbx, rbx
je 0x4a249a
mov ecx, 2
call rdi
lea rdx, str.__s_:
mov r8, rbx
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call rdi
mov rdx, rsi
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
mov ecx, 2
call rdi
mov ecx, 0xa
mov rdx, rax
call sub.msvcrt.dll_fputc
nop
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret

Function at 0x4a82e0
Capabilities:
Hide graphical window

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x005d3a70]
cmp byte [rsi + 0x1c], 0
je 0x4a8320
mov rbx, qword [0x005d3aa0]
mov rax, qword [rbx + 0x30]
test rax, rax
je 0x4a8343
mov rcx, qword [rax + 0x18]
xor edx, edx
call qword [sym.imp.USER32.dll_ShowWindow]
mov rax, qword [rbx + 0x30]
mov byte [rax + 0x54], 0
add rsp, 0x28
pop rbx
pop rsi
ret
lea rdx, str.glutHideWindow
lea rcx, [0x005b8cb8]
call fcn.004a2310
mov rbx, qword [0x005d3aa0]
mov rax, qword [rbx + 0x30]
test rax, rax
jne 0x4a8303
cmp dword [rsi + 0x94], 2
je 0x4a8303
lea rdx, str.glutHideWindow
lea rcx, str._ERROR:__Function___s__called_with_no_current_window_defined.
call fcn.004a2310
mov rax, qword [rbx + 0x30]
jmp 0x4a8303
Function at 0x4a8370
Capabilities:
Hide graphical window

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x005d3a70]
cmp byte [rsi + 0x1c], 0
je 0x4a83b5
mov rbx, qword [0x005d3aa0]
mov rax, qword [rbx + 0x30]
test rax, rax
je 0x4a83d8
mov rcx, qword [rax + 0x18]
mov edx, 6
mov byte [rax + 0x55], 0
call qword [sym.imp.USER32.dll_ShowWindow]
mov rax, qword [rbx + 0x30]
mov byte [rax + 0x54], 0
add rsp, 0x28
pop rbx
pop rsi
ret
lea rdx, str.glutIconifyWindow
lea rcx, [0x005b8cb8]
call fcn.004a2310
mov rbx, qword [0x005d3aa0]
mov rax, qword [rbx + 0x30]
test rax, rax
jne 0x4a8393
cmp dword [rsi + 0x94], 2
je 0x4a8393
lea rdx, str.glutIconifyWindow
lea rcx, str._ERROR:__Function___s__called_with_no_current_window_defined.
call fcn.004a2310
mov rax, qword [rbx + 0x30]
jmp 0x4a8393

Function at 0x4a8ee0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
movaps xmmword [rsp + 0x40], xmm6
movaps xmmword [rsp + 0x50], xmm7
movaps xmmword [rsp + 0x60], xmm8
movaps xmmword [rsp + 0x70], xmm9
mov rax, qword [0x005d3a70]
cmp byte [rax + 0x1c], 0
mov rsi, rcx
mov rbx, rdx
je 0x4a9090
mov rcx, rsi
call fcn.004a8d10
test rbx, rbx
mov rsi, rax
je 0x4a8f32
test rax, rax
je 0x4a8f32
cmp byte [rbx], 0
jne 0x4a8f54
movaps xmm6, xmmword [rsp + 0x40]
movaps xmm7, xmmword [rsp + 0x50]
movaps xmm8, xmmword [rsp + 0x60]
movaps xmm9, xmmword [rsp + 0x70]
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov ecx, 1
pxor xmm6, xmm6
pxor xmm8, xmm8
call qword [sym.imp.OPENGL32.dll_glPushClientAttrib]
mov rdi, qword [sym.imp.OPENGL32.dll_glPixelStorei]
xor edx, edx
mov ecx, 0xcf0
call rdi
xor edx, edx
mov ecx, 0xcf1
call rdi
xor edx, edx
mov ecx, 0xcf2
call rdi
xor edx, edx
mov ecx, 0xcf3
call rdi
xor edx, edx
mov ecx, 0xcf4
call rdi
mov edx, 1
mov ecx, 0xcf5
call rdi
mov rdi, qword [sym.imp.OPENGL32.dll_glBitmap]
movss xmm9, dword [0x005b8fe0]
add rbx, 1
movzx ecx, byte [rbx - 1]
test cl, cl
je 0x4a9023
cmp cl, 0xa
mov edx, dword [rsi + 0xc]
je 0x4a9050
mov rax, qword [rsi + 0x10]
pxor xmm0, xmm0
add rbx, 1
movss xmm3, dword [rsi + 0x1c]
movss xmm2, dword [rsi + 0x18]
mov rbp, qword [rax + rcx*8]
movzx ecx, byte [rbp]
lea rax, [rbp + 1]
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x30], rax
cvtsi2ss xmm0, ecx
movss dword [rsp + 0x20], xmm0
call rdi
movzx eax, byte [rbp]
pxor xmm0, xmm0
movzx ecx, byte [rbx - 1]
cvtsi2ss xmm0, eax
test cl, cl
addss xmm6, xmm0
jne 0x4a8fc4
movaps xmm6, xmmword [rsp + 0x40]
movaps xmm7, xmmword [rsp + 0x50]
movaps xmm8, xmmword [rsp + 0x60]
movaps xmm9, xmmword [rsp + 0x70]
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.OPENGL32.dll_glPopClientAttrib]
neg edx
pxor xmm0, xmm0
xor ecx, ecx
xorps xmm6, xmm9
cvtsi2ss xmm0, edx
movss dword [rsp + 0x20], xmm6
movaps xmm3, xmm8
xor edx, edx
mov qword [rsp + 0x30], 0
pxor xmm2, xmm2
pxor xmm6, xmm6
movss dword [rsp + 0x28], xmm0
call qword [sym.imp.OPENGL32.dll_glBitmap]
jmp 0x4a8fb8
lea rdx, str.glutBitmapString
lea rcx, [0x005b8ee0]
call fcn.004a2310
jmp 0x4a8f18
Function at 0x4b3c50
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00c88e44]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x4b3dd8
mov rax, qword [0x00c88e48]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4b3c9c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x4b3d25
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x4b3c80
mov rcx, rbx
call fcn.004b48f0
test rax, rax
mov r12, rax
je 0x4b3e0d
mov rax, qword [0x00c88e48]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.004b4a20
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00c88e48]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4b3df0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x4b3d1e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x4b3d80
add dword [0x00c88e44], 1
cmp edi, 8
jae 0x4b3d53
test dil, 4
jne 0x4b3dc4
test edi, edi
je 0x4b3d48
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x4b3ddf
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 0x4b3d48
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 0x4b3d6c
jmp 0x4b3d48
add rsi, qword [0x00c88e48]
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 0x4b3d1e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00587430
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x4b3d48
xor esi, esi
jmp 0x4b3ca7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x4b3d48
mov rax, qword [0x00c88e48]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.00587430
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.00587430
nop
nop dword [rax]

Function at 0x4b4560
Capabilities:
Get thread local storage value

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

Disassembly:
sub rsp, 0x28
mov r8, qword [0x005d3720]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x4b495d
mov rcx, r8
call fcn.004b47d0
test eax, eax
je 0x4b495d
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 0x4b495d
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 0x4b4954
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4b495f
add rax, 0x28
cmp rax, r9
jne 0x4b4940
xor eax, eax
add rsp, 0x28
ret

Function at 0x4b5050
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x4b5081
xor edx, edx
mov ecx, eax
mov dword [0x00c89170], eax
call fcn.004c5b80
test eax, eax
sete al
movzx eax, al
mov dword [0x0058ccf8], eax
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4b506e

Function at 0x4b5190
Capabilities:
Set thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov edi, 1
mov rax, qword [rdx]
mov rbp, qword [rcx + 0x10]
mov r12, qword [rcx + 0x18]
test rax, rax
mov rsi, rcx
mov rbx, rdx
mov r15, r8
je 0x4b5290
mov r13, qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x4b51ec
mov qword [0x00c89178], r14
mov rax, qword [rbx]
add edi, 1
mov rax, qword [rax]
test rax, rax
mov qword [rbx], rax
je 0x4b5290
mov r9, rsi
mov r8, qword [rsi]
mov edx, 0xa
mov ecx, 1
mov r14, qword [rax + 0x30]
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rbx
call rbp
test eax, eax
jne 0x4b52b0
test r14, r14
je 0x4b523f
mov qword [rsp + 0x20], rbx
mov r9, rsi
mov r8, qword [rsi]
mov edx, 0xa
mov ecx, 1
call r14
cmp eax, 7
je 0x4b52d5
cmp eax, 8
jne 0x4b52b0
mov rax, qword [rbx]
mov r14, qword [rax]
mov eax, dword [0x0058ccf8]
test eax, eax
js 0x4b5280
test eax, eax
je 0x4b51d0
mov rdx, r14
mov ecx, dword [0x00c89170]
call r13
test eax, eax
jne 0x4b51d7
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4b51d7
call fcn.004b5090
mov eax, dword [0x0058ccf8]
jmp 0x4b524f
mov qword [rsp + 0x28], r12
mov r9, rsi
mov r8, qword [rsi]
mov edx, 0x1a
mov qword [rsp + 0x20], rbx
mov ecx, 1
call rbp
test eax, eax
je 0x4b52d0
mov eax, 2
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, 5
mov dword [r15], edi
jmp 0x4b52b5
Function at 0x4b52e0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov eax, dword [0x0058ccf8]
test eax, eax
mov rbx, rcx
js 0x4b5360
test eax, eax
jne 0x4b5313
mov rax, qword [0x00c89178]
mov qword [0x00c89178], rbx
mov qword [rbx], rax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov edi, dword [0x00c89170]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rsi
mov ebp, eax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov qword [rbx], rdi
mov rdx, rbx
mov ecx, dword [0x00c89170]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4b530a
mov rax, rsi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax
call fcn.004b5090
mov eax, dword [0x0058ccf8]
jmp 0x4b52f5

Function at 0x4b5370
Capabilities:
Set thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov eax, dword [0x0058ccf8]
mov rbx, qword [rcx]
test eax, eax
js 0x4b53b2
test eax, eax
jne 0x4b5393
mov qword [0x00c89178], rbx
add rsp, 0x20
pop rbx
ret
mov rdx, rbx
mov ecx, dword [0x00c89170]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4b538d
add rsp, 0x20
pop rbx
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
call fcn.004b5090
mov eax, dword [0x0058ccf8]
jmp 0x4b5382

Function at 0x4b5480
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x40
mov eax, dword [0x0058ccf8]
test eax, eax
mov rbx, rcx
js 0x4b5500
test eax, eax
mov rsi, qword [0x00c89178]
jne 0x4b5516
test rsi, rsi
mov qword [rsp + 0x38], rsi
je 0x4b54f1
lea rdi, [rsp + 0x38]
mov rax, rsi
mov rax, qword [rax + 0x30]
test rax, rax
je 0x4b54df
mov qword [rsp + 0x20], rdi
mov r9, rbx
mov r8, qword [rbx]
mov edx, 1
mov ecx, 1
call rax
cmp eax, 6
je 0x4b5540
cmp eax, 8
jne 0x4b5573
mov rax, qword [rsp + 0x38]
mov rax, qword [rax]
test rax, rax
mov qword [rsp + 0x38], rax
jne 0x4b54b1
mov eax, 5
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
call fcn.004b5090
mov eax, dword [0x0058ccf8]
mov rsi, qword [0x00c89178]
test eax, eax
je 0x4b549f
mov esi, dword [0x00c89170]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4b549f
mov rax, qword [rsp + 0x38]
lea r8, [rsp + 0x34]
mov rdx, rdi
mov rcx, rbx
mov qword [rbx + 0x10], 0
mov qword [rsp + 0x38], rsi
mov qword [rbx + 0x18], rax
call fcn.004b4fa0
cmp eax, 7
jne 0x4b54f6
mov rcx, rdi
call fcn.004b5120
mov eax, 3
jmp 0x4b54f6
Function at 0x4b56c0
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
cmp qword [rcx + 0x10], 0
mov rbx, rcx
je 0x4b5710
mov edx, dword [0x0058ccf8]
test edx, edx
js 0x4b5720
test edx, edx
mov rsi, qword [0x00c89178]
jne 0x4b5736
mov qword [rsp + 0x28], rsi
lea rsi, [rsp + 0x28]
mov rcx, rbx
lea r8, [rsp + 0x24]
mov rdx, rsi
call fcn.004b5190
cmp eax, 7
jne 0x4b5759
mov rcx, rsi
call fcn.004b5120
nop dword [rax]
call fcn.004b5480
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
call fcn.004b5090
mov edx, dword [0x0058ccf8]
mov rsi, qword [0x00c89178]
test edx, edx
je 0x4b56e6
mov esi, dword [0x00c89170]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4b56e6
call sub.msvcrt.dll_abort
nop
nop
mov rax, qword [rcx + 8]
test rax, rax
je 0x4b5774
mov rdx, rcx
mov ecx, 1
jmp rax
ret
Function at 0x4c7f80
Capabilities:
Read file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov r9, qword [rcx + 0x40]
mov rsi, rdx
mov rbx, rcx
mov edx, 1
mov rcx, rsi
call sub.msvcrt.dll_fread
mov edx, 0xffffffff
test rax, rax
jle 0x4c7fac
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x530430
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 0x530458
call r12
cmp dword [rax], 4
jne 0x530476
mov rcx, rbp
call fcn.005302a0
mov r8d, esi
mov rdx, rdi
mov ecx, eax
call sub.msvcrt.dll__read
movsxd rbx, eax
cmp rbx, 0xffffffffffffffff
je 0x530450
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

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

Disassembly:
lea rcx, [0x0058fc20]
jmp 0x4b5980

Function at 0x587430
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.004c54e0
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.004c54e0
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 0x140006ed2
Capabilities:
Print debug messages

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x88
lea rbp, [rsp + 0x80]
mov qword [rbp], 0xfffffffffffffffe
mov rdx, rcx
mov rax, qword [rcx]
movsxd rcx, dword [rax + 4]
mov qword [rbp - 8], rdx
add rcx, rdx
mov dl, 0xa
call fcn.140008440
mov rcx, qword [rbp - 8]
mov edx, eax
call fcn.140008d0a
mov rcx, qword [rbp - 8]
call fcn.1400049b2
mov rax, qword [rbp - 8]
lea rcx, [rax + 8]
lea rsi, [rbp - 0x28]
mov rdx, rsi
call fcn.140008e18
mov rax, qword [0x140185338]
test rax, rax
je 0x140006f75
mov rcx, qword [rbp - 8]
mov rdx, qword [rcx + 0xe8]
mov r9, qword [rcx + 0xf0]
mov r8d, dword [rcx + 0xf8]
mov ecx, dword [rcx + 0xfc]
mov qword [rsp + 0x20], rsi
call rax
test al, al
je 0x140006f75
lea rcx, [rbp - 0x28]
call fcn.140005a44
mov rsi, qword [rbp - 8]
jmp 0x140007020
mov eax, dword [0x14017e250]
test al, 4
je 0x140006fc3
mov rdi, qword [rbp - 0x28]
mov rbx, qword [rbp - 0x10]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
cmp rbx, 0xf
cmovbe rdi, rsi
lea rdx, [0x140124a9d]
mov rcx, rax
mov r8, rdi
call fcn.140005579
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fflush
mov eax, dword [0x14017e250]
test al, 2
je 0x14000700a
mov rax, qword [rbp - 0x18]
cmp qword [rbp - 0x10], 0xf
jbe 0x140006fd6
mov rsi, qword [rbp - 0x28]
lea rdx, [rbp - 0x58]
mov qword [rdx], rsi
mov qword [rdx + 8], rax
lea rsi, [rbp - 0x48]
mov rcx, rsi
call fcn.14001d756
cmp qword [rbp - 0x30], 7
jbe 0x140006ff8
mov rsi, qword [rbp - 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rcx, [rbp - 0x48]
call fcn.140005a80
mov rsi, qword [rbp - 8]
cmp dword [rsi + 0xfc], 4
je 0x140007035
lea rcx, [rbp - 0x28]
call fcn.140005a44
mov rcx, rsi
call fcn.140006d5c
nop
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop rbp
ret
int3