joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140049880
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.140066590
sub rsp, rax
mov rax, qword [0x140088040]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x14008aba0]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x60], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x68]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x48], rax
jae 0x140049a72
lea rax, [rsp + 0x147f]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x38], rax
jae 0x1400499c6
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x48], rax
jae 0x1400499c6
mov rax, qword [rsp + 0x48]
movzx eax, byte [rax]
mov byte [rsp + 0x31], al
mov rax, qword [rsp + 0x48]
inc rax
mov qword [rsp + 0x48], rax
movzx eax, byte [rsp + 0x31]
mov byte [rsp + 0x30], al
movsx eax, byte [rsp + 0x30]
cmp eax, 0xa
jne 0x1400499ab
mov eax, dword [rsp + 0x70]
inc eax
mov dword [rsp + 0x70], eax
mov rax, qword [rsp + 0x38]
mov byte [rax], 0xd
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, byte [rsp + 0x30]
mov byte [rax], cl
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
jmp 0x140049948
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, dword [rsp + 0x40]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140049a32
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140049a91
mov eax, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x6c]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x6c], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x44], eax
jae 0x140049a6d
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140049a91
jmp 0x14004991e
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.14000cf70
add rsp, 0x1498
pop rdi
pop rsi
ret
Function at 0x140049ab0
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.140066590
sub rsp, rax
mov rax, qword [0x140088040]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x14008aba0]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x70]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x140049cbd
lea rax, [rsp + 0x147e]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x60]
cmp qword [rsp + 0x38], rax
jae 0x140049c09
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x140049c09
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
mov word [rsp + 0x40], ax
mov rax, qword [rsp + 0x50]
add rax, 2
mov qword [rsp + 0x50], rax
movzx eax, word [rsp + 0x40]
mov word [rsp + 0x30], ax
movzx eax, word [rsp + 0x30]
cmp eax, 0xa
jne 0x140049be9
mov eax, dword [rsp + 0x78]
add eax, 2
mov dword [rsp + 0x78], eax
mov eax, 0xd
mov rcx, qword [rsp + 0x38]
mov word [rcx], ax
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, word [rsp + 0x30]
mov word [rax], cx
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
jmp 0x140049b78
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov eax, eax
shl rax, 1
mov dword [rsp + 0x44], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x44]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140049c7d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140049cdc
mov eax, dword [rsp + 0x48]
mov ecx, dword [rsp + 0x74]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x48], eax
jae 0x140049cb8
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140049cdc
jmp 0x140049b4e
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.14000cf70
add rsp, 0x1498
pop rdi
pop rsi
ret
Function at 0x140055cc0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0xb8
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.14000c7c0
lea rcx, [rsp + 0x40]
call fcn.140055c80
movzx eax, al
test eax, eax
jne 0x140055d08
mov qword [rsp + 0x70], 0
lea rcx, [rsp + 0x40]
call fcn.140055bb0
mov rax, qword [rsp + 0x70]
jmp 0x140055ed9
lea rcx, [rsp + 0x40]
call fcn.14000c830
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x60]
call fcn.140055c30
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x78]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x40]
call fcn.14000c830
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x68]
mov r8, rax
xor edx, edx
xor ecx, ecx
call fcn.140052440
cdqe
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x140055dae
mov qword [rsp + 0x80], 0
lea rcx, [rsp + 0x40]
call fcn.140055bb0
mov rax, qword [rsp + 0x80]
jmp 0x140055ed9
mov r9d, 0x66
lea r8, str.minkernelcrtsucrt_srcdesktopcrtenvget_environment_from_os.cpp
mov edx, 2
mov rcx, qword [rsp + 0x58]
call fcn.14001d750
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.14000c7c0
lea rcx, [rsp + 0x48]
call fcn.14000cf10
movzx eax, al
test eax, eax
jne 0x140055e15
mov qword [rsp + 0x88], 0
lea rcx, [rsp + 0x48]
call fcn.14000cef0
lea rcx, [rsp + 0x40]
call fcn.140055bb0
mov rax, qword [rsp + 0x88]
jmp 0x140055ed9
lea rcx, [rsp + 0x48]
call fcn.14000c830
mov qword [rsp + 0x90], rax
lea rcx, [rsp + 0x40]
call fcn.14000c830
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x68]
mov r8, qword [rsp + 0x98]
xor edx, edx
xor ecx, ecx
call fcn.140052440
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x140055eab
mov qword [rsp + 0xa0], 0
lea rcx, [rsp + 0x48]
call fcn.14000cef0
lea rcx, [rsp + 0x40]
call fcn.140055bb0
mov rax, qword [rsp + 0xa0]
jmp 0x140055ed9
lea rcx, [rsp + 0x48]
call fcn.1400100e0
mov qword [rsp + 0xa8], rax
lea rcx, [rsp + 0x48]
call fcn.14000cef0
lea rcx, [rsp + 0x40]
call fcn.140055bb0
mov rax, qword [rsp + 0xa8]
add rsp, 0xb8
ret
Function at 0x140060960
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x128
lea rcx, [rsp + 0xe8]
call fcn.140034090
lea rcx, [rsp + 0xb8]
call fcn.140034090
lea rcx, [rsp + 0x88]
call fcn.140034090
call fcn.14003d380
mov r8d, eax
lea rdx, [rsp + 0xe8]
mov rcx, qword [rsp + 0x130]
call fcn.140033f80
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
je 0x140060a02
mov dword [rsp + 0x54], 0
lea rcx, [rsp + 0x88]
call fcn.140034120
lea rcx, [rsp + 0xb8]
call fcn.140034120
lea rcx, [rsp + 0xe8]
call fcn.140034120
mov eax, dword [rsp + 0x54]
jmp 0x140060ba8
call fcn.14003d380
mov r8d, eax
lea rdx, [rsp + 0xb8]
mov rcx, qword [rsp + 0x138]
call fcn.140033f80
mov dword [rsp + 0x58], eax
cmp dword [rsp + 0x58], 0
je 0x140060a62
mov dword [rsp + 0x5c], 0
lea rcx, [rsp + 0x88]
call fcn.140034120
lea rcx, [rsp + 0xb8]
call fcn.140034120
lea rcx, [rsp + 0xe8]
call fcn.140034120
mov eax, dword [rsp + 0x5c]
jmp 0x140060ba8
mov qword [rsp + 0x70], 0
cmp qword [rsp + 0x168], 0
je 0x140060ae8
call fcn.14003d380
mov r8d, eax
lea rdx, [rsp + 0x88]
mov rcx, qword [rsp + 0x168]
call fcn.140033f80
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
je 0x140060ad6
mov dword [rsp + 0x64], 0
lea rcx, [rsp + 0x88]
call fcn.140034120
lea rcx, [rsp + 0xb8]
call fcn.140034120
lea rcx, [rsp + 0xe8]
call fcn.140034120
mov eax, dword [rsp + 0x64]
jmp 0x140060ba8
lea rcx, [rsp + 0x88]
call fcn.140034450
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0xb8]
call fcn.140034450
mov qword [rsp + 0x78], rax
lea rcx, [rsp + 0xe8]
call fcn.140034450
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x178]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x170]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x160]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x158]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x150]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x148]
mov r8, qword [rsp + 0x140]
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [rsp + 0x68], eax
lea rcx, [rsp + 0x88]
call fcn.140034120
lea rcx, [rsp + 0xb8]
call fcn.140034120
lea rcx, [rsp + 0xe8]
call fcn.140034120
mov eax, dword [rsp + 0x68]
add rsp, 0x128
ret
Function at 0x140063170
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xb8
lea rcx, [rsp + 0x78]
call fcn.140034090
lea rcx, [rsp + 0x48]
call fcn.140034090
call fcn.14003d380
mov r8d, eax
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0xc0]
call fcn.140033f80
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
je 0x1400631df
mov dword [rsp + 0x24], 0
lea rcx, [rsp + 0x48]
call fcn.140034120
lea rcx, [rsp + 0x78]
call fcn.140034120
mov eax, dword [rsp + 0x24]
jmp 0x140063270
call fcn.14003d380
mov r8d, eax
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0xc8]
call fcn.140033f80
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
je 0x140063226
mov dword [rsp + 0x2c], 0
lea rcx, [rsp + 0x48]
call fcn.140034120
lea rcx, [rsp + 0x78]
call fcn.140034120
mov eax, dword [rsp + 0x2c]
jmp 0x140063270
lea rcx, [rsp + 0x48]
call fcn.140034450
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x78]
call fcn.140034450
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [rsp + 0x30], eax
lea rcx, [rsp + 0x48]
call fcn.140034120
lea rcx, [rsp + 0x78]
call fcn.140034120
mov eax, dword [rsp + 0x30]
add rsp, 0xb8
ret
Function at 0x1400047e4
Capabilities:
Identify system language via api

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x60
mov rax, qword [0x1400128b8]
xor rax, rsp
mov qword [rsp + 0x58], rax
lea r14, str.en_US
mov rsi, rcx
mov qword [rcx], r14
call qword [sym.imp.KERNEL32.dll_GetSystemDefaultUILanguage]
mov word [rsp + 0x30], ax
mov ebx, 0x10
mov r9d, ebx
lea rdx, [0x140008110]
lea rax, [0x140004df0]
mov r8d, 0x1b3
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x20], rax
call sub.api_ms_win_crt_private_l1_1_0.dll__o_bsearch
xor ebp, ebp
test rax, rax
jne 0x14000485f
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400048e5
cmp dword [rax + 0xc], 0x7c
jne 0x14000486c
cmp word [rax + 8], 0x7f
jne 0x14000484f
mov r8, qword [rax]
or rcx, 0xffffffffffffffff
inc rcx
cmp word [r8 + rcx*2], bp
jne 0x140004873
inc rcx
cmp rcx, 0x7ffffffe
jbe 0x140004890
mov word [rsp + 0x38], bp
jmp 0x1400048d7
lea rax, [rsp + 0x38]
mov r9d, ebp
sub r8, rax
lea rdx, [rsp + 0x38]
lea rax, [rbx - 0x10]
add rax, rcx
je 0x1400048c0
movzx eax, word [r8 + rdx]
test ax, ax
je 0x1400048c0
mov word [rdx], ax
add rdx, 2
sub rbx, 1
jne 0x1400048a0
test rbx, rbx
jne 0x1400048cf
sub rdx, 2
mov r9d, 0x8007007a
mov word [rdx], bp
test r9d, r9d
jns 0x1400048e1
mov ecx, 0x7a
jmp 0x140004854
test ecx, ecx
jne 0x1400048f1
mov rcx, qword [rsp + 0x78]
call fcn.14000494c
jmp 0x14000492a
mov rbx, rbp
mov rdi, rbp
mov rdx, qword [rdi + r14]
lea rcx, [rsp + 0x38]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
test eax, eax
je 0x14000491c
inc rbx
add rdi, 0x30
cmp rdi, 0x750
jb 0x1400048f7
jmp 0x14000492a
lea rax, [rbx + rbx*2]
shl rax, 4
add rax, r14
mov qword [rsi], rax
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400050e0
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret

Function at 0x140005104
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x140012e60], eax
call fcn.1400056f0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x140012e60], 0
jne case.default.0x14000515a
mov ecx, 1
call fcn.1400056f0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp edi, esi
invalid
Function at 0x1400033b8
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140003402
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140003402
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140003402
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140003402
cmp dword [rcx + 0x84], 0xe
jbe 0x140003402
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140003404
xor al, al
add rsp, 0x28
ret
Function at 0x18006bc90
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
xor ebx, ebx
mov ebp, 0xfffffffe
mov rdi, rcx
mov dword [rcx], ebx
mov eax, ebp
lock cmpxchg dword [0x18025e63c], ebp
lea esi, [rbx + 1]
cmp eax, 0xfffffffe
jne 0x18006bd1c
xor eax, eax
lock cmpxchg dword [0x180265040], esi
cmp eax, esi
jne 0x18006bce6
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
lock cmpxchg dword [0x180265040], esi
cmp eax, esi
je 0x18006bcd0
mov eax, ebp
lock cmpxchg dword [0x18025e63c], ebp
mov ecx, eax
cmp eax, 0xfffffffe
jne 0x18006bd0a
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x18006bd0a
xchg dword [0x18025e63c], eax
xchg dword [0x180265040], ebx
cmp ecx, 0xffffffff
jne 0x18006bd1c
mov eax, 0x8007000e
jmp 0x18006bd76
mov ecx, dword [0x18025e63c]
test ecx, ecx
js 0x18006bd3b
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x18006bd3b
inc dword [rax + 0x254]
mov dword [rdi], esi
jmp 0x18006bd74
mov ecx, 0x258
call sub.msvcrt.dll_malloc
mov rbx, rax
test rax, rax
je 0x18006bd15
xor edx, edx
mov r8d, 0x258
mov rcx, rax
call fcn.18024adb8
mov dword [rbx + 0x254], esi
mov dword [rdi], esi
mov ecx, dword [0x18025e63c]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x18006bda0
Capabilities:
Get thread local storage value

Disassembly:
test rcx, rcx
je 0x18006bdd4
push rbx
sub rsp, 0x20
mov rbx, rcx
mov ecx, dword [0x18025e63c]
test ecx, ecx
jns 0x18006bdbb
xor eax, eax
jmp 0x18006bdc1
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rcx, qword [rax]
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
add rsp, 0x20
pop rbx
repz ret

Function at 0x18006bde0
Capabilities:
Get thread local storage value

Disassembly:
test rcx, rcx
je 0x18006be23
push rbx
sub rsp, 0x20
mov rbx, rcx
mov ecx, dword [0x18025e63c]
test ecx, ecx
js 0x18006be0a
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x18006be0a
mov rax, qword [rax]
test rax, rax
jne 0x18006be10
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
add rsp, 0x20
pop rbx
repz ret
Function at 0x180071960
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
mov ecx, dword [0x18025e63c]
xor ebx, ebx
test ecx, ecx
jns 0x18007197e
mov r9, rbx
jmp 0x180071987
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r9, rax
mov ecx, ebx
lea rdx, [0x180027ab0]
lea r8, [r9 + 0x48]
cmp qword [rdx], rdi
jne 0x18007199e
cmp qword [r8], rbx
jne 0x1800719c8
inc ecx
add rdx, 8
add r8, 0x10
cmp ecx, 0xf
jb 0x180071994
mov rcx, qword [r9 + 0x40]
mov r8d, 0x10
mov edx, edi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp fcn.180243b70
mov edx, ecx
add rdx, rdx
mov r8, qword [r9 + rdx*8 + 0x48]
test r8, r8
je 0x1800719f9
mov rax, qword [r8]
mov qword [r9 + rdx*8 + 0x48], rax
test rax, rax
jne 0x1800719e9
mov qword [r9 + rdx*8 + 0x50], rbx
movabs rax, 0xfefefefefefefefe
mov rbx, r8
mov qword [r8], rax
cmp ecx, 0xf
jae 0x1800719ad
mov rax, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x1800726a0
Capabilities:
Get thread local storage value

Disassembly:
test rcx, rcx
je 0x18007271f
push rbx
sub rsp, 0x20
mov rbx, rcx
mov ecx, dword [0x18025e63c]
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], rdi
test ecx, ecx
jns 0x1800726c5
xor edi, edi
jmp 0x1800726ce
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
movsxd r8, dword [rbx + 8]
lea rax, [0x180027ab0]
mov edx, 0xfe
mov rsi, r8
mov r8, qword [rax + r8*8]
mov rcx, rbx
add rsi, rsi
call fcn.18024adb8
mov qword [rbx], 0
mov rax, qword [rdi + rsi*8 + 0x50]
test rax, rax
je 0x180072706
mov qword [rax], rbx
jmp 0x18007270b
mov qword [rdi + rsi*8 + 0x48], rbx
mov qword [rdi + rsi*8 + 0x50], rbx
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x30]
add rsp, 0x20
pop rbx
repz ret
Function at 0x18007e420
Capabilities:
Get thread local storage value

Disassembly:
push rsi
sub rsp, 0x20
cmp qword [rcx + 8], 0
mov rsi, rcx
je 0x18007e4d6
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rdi
nop
mov rbx, qword [rsi + 8]
mov rax, qword [rbx + 0x18]
mov qword [rsi + 8], rax
mov eax, dword [rbx + 0xc]
test al, 8
jne 0x18007e457
test al, 1
jne 0x18007e490
mov rdi, qword [rbx]
test rdi, rdi
je 0x18007e490
mov ecx, dword [0x18025e63c]
test ecx, ecx
js 0x18007e47c
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x18007e47c
mov rax, qword [rax]
test rax, rax
jne 0x18007e482
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [0x18025e63c]
test ecx, ecx
js 0x18007e4ad
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x18007e4ad
mov rax, qword [rax]
test rax, rax
jne 0x18007e4b3
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rsi + 8], 0
jne 0x18007e440
mov rdi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rsi
ret
Function at 0x18007e4f0
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push r13
sub rsp, 0x20
mov esi, r9d
mov ebx, r8d
mov rbp, rdx
mov r13, rcx
test r8d, r8d
je 0x18007e526
test rdx, rdx
jne 0x18007e526
mov eax, 0x80004005
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r13
pop rsi
pop rbp
ret
mov qword [rsp + 0x40], rdi
cmp ebx, 0xffffffff
jne 0x18007e540
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
mov ebx, ecx
cmp ebx, 0xfffffffe
jne 0x18007e557
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea ebx, [rcx + rcx]
test r9b, 1
jne 0x18007e560
or esi, 2
test sil, 2
je 0x18007e59b
test sil, 0x10
jne 0x18007e59b
mov rdi, qword [r13 + 8]
test rdi, rdi
je 0x18007e59b
test byte [rdi + 0xc], 2
je 0x18007e592
cmp ebx, dword [rdi + 8]
jne 0x18007e592
mov rdx, qword [rdi]
mov r8d, ebx
mov rcx, rbp
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x18007e5df
mov rdi, qword [rdi + 0x18]
test rdi, rdi
jne 0x18007e575
mov ecx, dword [0x18025e63c]
test ecx, ecx
js 0x18007e5b8
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x18007e5b8
mov rax, qword [rax]
test rax, rax
jne 0x18007e5be
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 0x20]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x18007e609
mov eax, 0x8007000e
jmp 0x18007e6c4
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x18007e5ee
mov eax, dword [rdi + 0x10]
mov dword [rcx], eax
test sil, 1
je 0x18007e602
test sil, 8
je 0x18007e602
mov rcx, rbp
call fcn.18006bde0
xor eax, eax
jmp 0x18007e6c4
mov qword [rsp + 0x48], r12
test sil, 1
jne 0x18007e66f
mov ecx, dword [0x18025e63c]
test ecx, ecx
js 0x18007e631
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x18007e631
mov rax, qword [rax]
test rax, rax
jne 0x18007e637
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
mov r12d, ebx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rdi], rax
test rax, rax
jne 0x18007e65f
mov rcx, rdi
call fcn.18006bde0
mov eax, 0x8007000e
jmp 0x18007e6bf
mov r8, r12
mov rdx, rbp
mov rcx, rax
call sub.msvcrt.dll_memcpy
jmp 0x18007e672
mov qword [rax], rbp
test sil, 4
jne 0x18007e686
mov eax, dword [r13 + 4]
add eax, 3
and eax, 0xfffffffc
mov dword [r13 + 4], eax
mov eax, dword [r13 + 4]
mov qword [rdi + 0x18], 0
mov dword [rdi + 8], ebx
mov dword [rdi + 0xc], esi
mov dword [rdi + 0x10], eax
mov rax, qword [r13 + 0x10]
add dword [r13 + 4], ebx
lea rcx, [rdi + 0x18]
mov qword [rax], rdi
mov qword [r13 + 0x10], rcx
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x18007e6bd
mov eax, dword [rdi + 0x10]
mov dword [rcx], eax
xor eax, eax
mov r12, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r13
pop rsi
pop rbp
ret