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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
cmp qword [rcx + 0x3260], 0
lea rbx, [rcx + 0x3268]
mov rsi, r8
mov rbp, rdx
mov rdi, rcx
je 0x14001e7b7
mov r9d, dword [rbx + 4]
mov qword [rsp + 0x30], r14
xor r14d, r14d
test r9d, r9d
jns 0x14001e76a
mov eax, r9d
mov rcx, rbx
cdq
sub eax, edx
mov edx, r14d
sar eax, 1
add eax, r9d
test eax, eax
cmovg edx, eax
call fcn.14002b1b0
mov r8, rsi
mov dword [rbx], r14d
mov rdx, rbp
mov rcx, rbx
call fcn.14000ac40
mov eax, dword [rbx]
mov edx, 1
mov r9, qword [rdi + 0x3260]
test eax, eax
lea ecx, [rax - 1]
mov rax, qword [rdi + 0x3270]
cmove ecx, r14d
test rax, rax
movsxd r8, ecx
lea rcx, [0x14005eb61]
cmovne rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r14, qword [rsp + 0x30]
jmp 0x14001e7bf
mov rcx, rbx
call fcn.14000ac40
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

Function at 0x14001ec00
Capabilities:
Hash data with crc32

Disassembly:
push rbx
movzx r9d, byte [rcx]
lea r8, [rcx + 1]
mov r10d, 0xffffffff
mov rbx, rcx
mov eax, r10d
test r9b, r9b
je 0x14001ec52
lea r11, [0x140050b00]
cmp r9b, 0x23
jne 0x14001ec35
cmp byte [r8], r9b
jne 0x14001ec35
cmp byte [r8 + 1], r9b
cmove eax, r10d
movzx edx, al
movzx ecx, r9b
movzx r9d, byte [r8]
xor rdx, rcx
shr eax, 8
inc r8
xor eax, dword [r11 + rdx*4]
test r9b, r9b
jne 0x14001ec22
mov r11, qword [0x14005eb78]
xor r9d, r9d
not eax
mov r10, qword [r11 + 0x3228]
test r10, r10
lea rcx, [r10 + 4]
cmovne r9, rcx
test r9, r9
je 0x14001ec9e
cmp dword [r9], eax
je 0x14001eca7
movsxd r8, dword [r9 - 4]
movsxd rdx, dword [r11 + 0x3220]
add r8, r9
add rdx, 4
xor r9d, r9d
add rdx, r10
cmp r8, rdx
cmovne r9, r8
test r9, r9
jne 0x14001ec75
mov rcx, rbx
pop rbx
jmp fcn.14001eb10
test r9, r9
je 0x14001ec9e
mov rax, r9
pop rbx
ret
Function at 0x140021cd0
Capabilities:
Hash data with crc32

Disassembly:
test r8d, r8d
jle 0x140021f0e
mov r11, rsp
push rbp
push rsi
sub rsp, 0x58
mov rax, qword [0x14005e040]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov qword [r11 - 0x18], rdi
mov rbp, rcx
mov qword [r11 - 0x20], r14
lea rdi, [rdx + 0x1a]
mov qword [r11 - 0x28], r15
mov r14d, 0xffffffff
lea r15, [0x140050b00]
mov qword [r11 + 0x18], rbx
movsxd rsi, r8d
nop dword [rax + rax]
mov edx, dword [rdi - 0x1a]
test edx, edx
je 0x140021ed6
mov rcx, rbp
call fcn.140021310
mov r9d, dword [rdi - 0x16]
mov rbx, rax
test r9d, r9d
je 0x140021da1
movsxd rdx, dword [rbp + 0x31c0]
mov r8, qword [rbp + 0x31c8]
mov r10, rdx
shl r10, 4
add r10, r8
test rdx, rdx
je 0x140021d91
nop dword [rax]
mov rcx, rdx
shr rcx, 1
mov rax, rcx
add rax, rax
cmp dword [r8 + rax*8], r9d
jae 0x140021d89
lea r8, [r8 + rax*8]
mov rax, 0xffffffffffffffff
sub rax, rcx
add r8, 0x10
add rdx, rax
jmp 0x140021d8c
mov rdx, rcx
test rdx, rdx
jne 0x140021d60
cmp r8, r10
je 0x140021da1
cmp dword [r8], r9d
jne 0x140021da1
mov rcx, qword [r8 + 8]
jmp 0x140021da3
xor ecx, ecx
mov qword [rbx + 0x10], rcx
movsx eax, word [rdi - 2]
movd xmm1, eax
movsx eax, word [rdi]
cvtdq2ps xmm1, xmm1
movd xmm0, eax
movss dword [rbx + 0x40], xmm1
cvtdq2ps xmm0, xmm0
movss dword [rbx + 0x44], xmm0
movsx eax, word [rdi + 2]
movd xmm1, eax
movsx eax, word [rdi + 4]
cvtdq2ps xmm1, xmm1
movd xmm0, eax
movss dword [rbx + 0x48], xmm1
cvtdq2ps xmm0, xmm0
movss dword [rbx + 0x4c], xmm0
movsx eax, word [rdi + 6]
movd xmm1, eax
movsx eax, word [rdi + 8]
cvtdq2ps xmm1, xmm1
movd xmm0, eax
mov eax, dword [rbx + 0xb8]
and eax, 0xfffffe49
movss dword [rbx + 0x50], xmm1
or eax, 0x49
mov dword [rbx + 0xb8], eax
cvtdq2ps xmm0, xmm0
movss dword [rbx + 0x54], xmm0
test rcx, rcx
je 0x140021e37
cmp qword [rcx + 0x18], 0
jne 0x140021e2c
mov qword [rcx + 0x18], rbx
jmp 0x140021e37
cmp qword [rcx + 0x20], 0
jne 0x140021e37
mov qword [rcx + 0x20], rbx
mov eax, dword [rdi - 0xe]
mov r9, rbx
mov dword [rbx + 0xb0], eax
movsx eax, byte [rdi - 0xa]
mov dword [rbx + 0x58], eax
mov eax, dword [rdi - 6]
and eax, 0x61fc20
or dword [rbx + 8], eax
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x140021e6c
nop
mov r9, rax
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x140021e60
mov r9d, dword [r9]
lea r8, str.DockNode__02X
mov edx, 0x14
lea rcx, [rsp + 0x20]
call fcn.14000a4a0
movzx r9d, byte [rsp + 0x20]
lea r8, [rsp + 0x21]
mov ecx, r14d
test r9b, r9b
je 0x140021ec8
cmp r9b, 0x23
jne 0x140021eab
cmp byte [r8], r9b
jne 0x140021eab
cmp byte [r8 + 1], r9b
cmove ecx, r14d
movzx edx, cl
movzx eax, r9b
movzx r9d, byte [r8]
xor rdx, rax
shr ecx, 8
inc r8
xor ecx, dword [r15 + rdx*4]
test r9b, r9b
jne 0x140021e98
not ecx
call fcn.1400123a0
mov qword [rbx + 0x80], rax
add rdi, 0x24
sub rsi, 1
jne 0x140021d20
mov r15, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14004dc90
add rsp, 0x58
pop rsi
pop rbp
ret
Function at 0x14004ea2c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14004ea76
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14004ea76
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14004ea76
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14004ea76
cmp dword [rcx + 0x84], 0xe
jbe 0x14004ea76
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14004ea78
xor al, al
add rsp, 0x28
ret
Function at 0x40200d
Capabilities:
Enumerate process modules

Disassembly:
mov eax, 0x1038
call fcn.00412900
sub rsp, rax
mov edx, 0x1000
lea rcx, [rsp + 0x30]
mov dword [rsp + 0x2c], 0
lea r8, [rsp + 0x2c]
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
je 0x402047
xor eax, eax
cmp dword [rsp + 0x2c], 0x18f
setbe al
add rsp, 0x1038
ret

Function at 0x402084
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub rsp, 0x28
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor edx, edx
cmp eax, 0xffffffff
je 0x4020a0
shr eax, 4
mov edx, eax
and edx, 1
movzx eax, dl
add rsp, 0x28
ret

Function at 0x4020a8
Capabilities:
Get token membership

Disassembly:
sub rsp, 0x88
mov r9d, 0x220
mov r8d, 0x20
mov edx, 2
lea rax, [rsp + 0x78]
mov dword [rsp + 0x6c], 0
mov qword [rsp + 0x78], 0
lea rcx, [rsp + 0x72]
mov dword [rsp + 0x72], 0
mov word [rsp + 0x76], 0x500
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x402146
lea r8, [rsp + 0x6c]
xor ecx, ecx
mov rdx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
xor eax, eax
cmp dword [rsp + 0x6c], 1
sete al
add rsp, 0x88
ret
Function at 0x4021ca
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push r15
mov eax, 0x1068
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.00412900
sub rsp, rax
mov qword [rsp + 0x10b0], rcx
lea rcx, [0x004abee0]
mov rbx, rdx
call fcn.00412ff0
lea rcx, [0x004abec0]
mov rbp, rax
call fcn.00412ff0
cmp byte [rbp], 0
mov rdx, rax
lea r10, [rax + 0xc]
jne 0x402278
lea rdi, [rsp + 0x3c]
mov ecx, 9
mov byte [rax + 0xa], 0
lea rsi, [0x004b0680]
mov qword [rax], 0
rep movsd dword [rdi], dword [rsi]
mov word [rax + 8], 0
lea rdi, [rsp + 0x60]
xor eax, eax
lea rsi, [rsp + 0x3c]
mov ecx, 9
rep movsd dword [rdi], dword [rsi]
lea r8, [rsp + 0x60]
mov ecx, 6
mov rdi, r10
rep stosd dword [rdi], eax
mov eax, 0xc
mov cx, word [r8 + rax]
mov word [rdx + rax], cx
add rax, 2
cmp rax, 0x24
jne 0x402261
mov byte [rbp], 1
cmp byte [rdx + 0xa], 0
jne 0x4022f4
mov rax, r10
mov r9d, 0xffffff92
mov ecx, dword [rdx + 4]
lea esi, [rcx + 1]
lea ebp, [rcx + 2]
lea r13d, [rcx + 4]
lea r15d, [rcx + 5]
lea r11d, [rcx + 4]
lea r14d, [rcx + 3]
lea r12d, [rcx + 2]
lea edi, [rcx + 1]
mov r8d, dword [rdx]
cmp r8d, esi
jne 0x4022ba
xor word [rax], di
inc r8d
mov dword [rdx], r8d
jmp 0x4022a7
cmp r8d, ebp
jne 0x4022c5
xor word [rax], r12w
jmp 0x4022b2
cmp r8d, ecx
jne 0x4022d0
xor word [rax], r9w
jmp 0x4022e6
cmp r8d, r13d
jne 0x4022db
xor word [rax], r14w
jmp 0x4022b2
cmp r8d, r15d
jne 0x4022e6
xor word [rax], r11w
jmp 0x4022b2
inc r9d
add rax, 2
cmp r9w, 0xff9e
jne 0x402287
mov byte [rdx + 0xa], 1
xor r9d, r9d
xor r8d, r8d
mov edx, 1
mov dword [rsp + 0x20], 0
mov rcx, r10
call qword [sym.imp.WININET.dll_InternetOpenW]
mov rsi, rax
xor eax, eax
test rsi, rsi
je 0x4023de
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x2400
mov rdx, qword [rsp + 0x10b0]
call qword [sym.imp.WININET.dll_InternetOpenUrlW]
test rax, rax
mov rdi, rax
je 0x402365
lea r12, [rsp + 0x3c]
mov r13, qword [sym.imp.WININET.dll_InternetReadFile]
lea rbp, [rsp + 0x60]
jmp 0x40238c
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x4023dc
mov r9d, dword [rsp + 0x3c]
test r9d, r9d
je 0x4023c1
mov rdx, qword [rbx + 8]
add r9, rbp
mov r8, rbp
mov rcx, rbx
call fcn.00494490
mov r9, r12
mov r8d, 0x1000
mov rdx, rbp
mov rcx, rdi
call r13
test eax, eax
jne 0x402370
cmp dword [rsp + 0x3c], 0
je 0x4023c1
mov rcx, rdi
mov rbx, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rbx
mov rcx, rsi
call rbx
mov eax, 1
jmp 0x4023de
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4023a9
mov rcx, rdi
mov rbx, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rbx
mov rcx, rsi
call rbx
xor eax, eax
add rsp, 0x1068
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x4024db
Capabilities:
Query environment variable

Disassembly:
push rsi
push rbx
sub rsp, 0x138
mov r8d, 0x104
lea rsi, [rsp + 0x2c]
mov rax, rdx
mov rbx, rcx
mov rdx, rsi
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea rdx, [0x004b0068]
dec eax
cmp eax, 0x102
ja 0x402514
mov rdx, rsi
mov rcx, rbx
call fcn.004023f2
mov rax, rbx
add rsp, 0x138
pop rbx
pop rsi
ret
Function at 0x40298c
Capabilities:
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x1d8
lea r8, [0x004b00c0]
lea rbx, [rsp + 0x70]
mov rdx, rcx
mov r13, rcx
lea r12, [rsp + 0x90]
mov rcx, rbx
call fcn.004a6a80
mov rdx, r12
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rbp, rax
mov rcx, rbx
call fcn.00495540
cmp rbp, 0xffffffffffffffff
je 0x402aeb
lea rsi, [rsp + 0x30]
lea rdx, [r12 + 0x2c]
mov rcx, rsi
call fcn.004023f2
lea rdx, [0x004b00c3]
mov rcx, rsi
call fcn.00432600
test eax, eax
je 0x402a7b
lea rdx, [0x004b00c5]
mov rcx, rsi
call fcn.00432600
test eax, eax
je 0x402a7b
lea r8, [0x004b00c8]
mov rdx, r13
mov rcx, rbx
call fcn.004a6a80
mov rdx, rsi
mov rcx, rbx
call fcn.00496060
lea rdi, [rsp + 0x50]
mov rdx, rax
mov rcx, rdi
call fcn.00497910
mov rcx, rbx
call fcn.00495540
mov edx, 6
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test byte [rsp + 0x90], 0x10
jne 0x402a71
mov rcx, rdi
call fcn.00495540
jmp 0x402a7b
mov rcx, rdi
call fcn.0040298c
jmp 0x402a67
mov rcx, rsi
call fcn.00495540
mov rdx, r12
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4029e5
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x402aeb
add rsp, 0x1d8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
Function at 0x4119a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004da664]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x411b28
mov rax, qword [0x004da668]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4119ec
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x411a75
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x4119d0
mov rcx, rbx
call fcn.00412640
test rax, rax
mov r12, rax
je 0x411b5d
mov rax, qword [0x004da668]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.00412770
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004da668]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x411b40
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x411a6e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x411ad0
add dword [0x004da664], 1
cmp edi, 8
jae 0x411aa3
test dil, 4
jne 0x411b14
test edi, edi
je 0x411a98
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x411b2f
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 0x411a98
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 0x411abc
jmp 0x411a98
add rsi, qword [0x004da668]
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 0x411a6e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.004aa6a0
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x411a98
xor esi, esi
jmp 0x4119f7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x411a98
mov rax, qword [0x004da668]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.004aa6a0
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.004aa6a0
nop
nop dword [rax]

Function at 0x4122b0
Capabilities:
Get thread local storage value

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

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004b67f0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x4126ad
mov rcx, r8
call fcn.00412520
test eax, eax
je 0x4126ad
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 0x4126ad
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 0x4126a4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4126af
add rax, 0x28
cmp rax, r9
jne 0x412690
xor eax, eax
add rsp, 0x28
ret

Function at 0x421330
Capabilities:
Allocate thread local storage

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

Function at 0x421850
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x421873
call fcn.004211f0
cmp eax, 1
je 0x42187e
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 0x4218f5
mov eax, 0x28
jmp 0x4218da
add rax, 1
cmp rax, 0x6b
je 0x4218e7
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x4218d0
cmp eax, 0x6a
jne 0x4218fa
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 0x4218e7
Function at 0x4219a0
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 [0x004db420], 1
je 0x4219b6
call fcn.00421910
mov ecx, dword [0x004ac728]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x4219e0
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.00421790
cmp qword [0x004de050], 0
mov rsi, rax
je 0x4219ca
test rax, rax
je 0x4219ca
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.00421850
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 0x421ad0
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rdx, rsi
mov ecx, dword [0x004ac728]
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 0x421ad0
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 0x474b60
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 0x474b88
call r12
cmp dword [rax], 4
jne 0x474ba6
mov rcx, rbp
call fcn.00474a60
mov r8d, esi
mov rdx, rdi
mov ecx, eax
call sub.msvcrt.dll__read
movsxd rbx, eax
cmp rbx, 0xffffffffffffffff
je 0x474b80
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x4aa6a0
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.0041f9e0
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.0041f9e0
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 0x140769058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1407691df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140769089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14076906f
add dl, dl
jne 0x140769096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1407690f6
xor eax, eax
add dl, dl
jne 0x1407690a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1407691ad
add dl, dl
jne 0x1407690b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1407690c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1407690d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1407690dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1407690ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14076907e
mov eax, 1
add dl, dl
jne 0x140769106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140769113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1407690fb
sub eax, ebx
mov ebx, 1
jne 0x14076914c
mov ecx, 1
add dl, dl
jne 0x14076912e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14076913b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140769123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14076907e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140769168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140769175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14076915d
cmp eax, 0x7d00
jae 0x14076919b
cmp eax, 0x500
jb 0x140769196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14076907e
cmp eax, 0x7f
ja 0x14076919e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14076907e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1407691d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x14076907e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x180002f30
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x90]
sub rsp, 0x190
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x1d8], rbx
mov rax, qword [0x18007e090]
xor rax, rsp
mov qword [rbp + 0x80], rax
mov rsi, r8
mov rdi, rcx
mov qword [rsp + 0x38], r8
mov rbx, qword [rbp + 0xe0]
mov qword [rsp + 0x40], rbx
mov r8d, 0xa
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r14, rax
test rax, rax
jne 0x180002fbc
mov rcx, rsi
call fcn.180006c30
nop
mov r8, qword [rbx + 0x18]
cmp r8, 8
jb 0x180002fb5
inc r8
mov rdx, qword [rbx]
mov rcx, rbx
call fcn.18000b6e0
xor edi, edi
jmp 0x180003101
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x180002f94
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r15, rax
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
xor edi, edi
test r15, r15
je 0x1800030e0
test eax, eax
je 0x1800030e0
mov qword [rsp + 0x60], 7
mov qword [rsp + 0x58], rdi
mov word [rsp + 0x48], di
mov r8d, eax
shr r8, 1
mov rdx, r15
lea rcx, [rsp + 0x48]
call fcn.18000a880
nop
xor edx, edx
mov r8d, 0x108
lea rcx, [rsp + 0x70]
call fcn.1800334e0
mov rdx, rsi
lea rcx, [rsp + 0x70]
call fcn.180007b10
nop
cmp qword [rbp - 8], rdi
je 0x1800030a3
lea rdx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rdx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x58]
add r8, r8
lea rcx, [rsp + 0x70]
call fcn.1800086c0
lea rcx, [rsp + 0x78]
call fcn.18000bb40
test rax, rax
jne 0x1800030a3
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea r9, [rsp + 0x70]
add rcx, r9
mov eax, dword [rcx + 0x10]
or eax, 2
mov edx, eax
or edx, 4
cmp qword [rcx + 0x48], rdi
cmovne edx, eax
xor r8d, r8d
call fcn.180002a50
nop
lea rcx, [rbp + 0x18]
call fcn.180007a90
nop
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x18], rax
lea rcx, [rbp + 0x18]
call fcn.180014ad4
nop
mov r8, qword [rsp + 0x60]
cmp r8, 8
jb 0x1800030e0
inc r8
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x48]
call fcn.18000b6e0
nop
mov rcx, rsi
call fcn.180006c30
nop
mov r8, qword [rbx + 0x18]
cmp r8, 8
jb 0x180003101
inc r8
mov rdx, qword [rbx]
mov rcx, rbx
call fcn.18000b6e0
mov qword [rbx + 0x18], 7
cmp qword [rbx + 0x18], 8
mov qword [rbx + 0x10], rdi
jb 0x180003117
mov rbx, qword [rbx]
mov word [rbx], di
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.1800305b0
mov rbx, qword [rsp + 0x1d8]
add rsp, 0x190
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret