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

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je case.default.0x140001a51
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x140001a7e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140001a80
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140001ad9
test ecx, ecx
jle 0x140001ab9
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x140001ad9
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140001ad9
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
Function at 0x140001b00
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x140001b22
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je case.default.0x140001b31
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140001b54
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140001b56
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140001b92
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x140001c2e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x140001bcd
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x140001c0e
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x140001c2e
cmp rbx, rax
ja 0x140001be0
test rbx, rbx
je 0x140001c2e
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
Function at 0x140002090
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140007040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x1400020bd
xor eax, eax
jmp 0x140002229
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x1400020f7
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x1400020f7
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x140002229
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x14000221c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x14000213a
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140002165
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140002221
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x1400021d4
sub eax, 1
je 0x1400021d4
cmp eax, 2
jne 0x14000221c
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140002221
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140002202
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x14000221c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140002221
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140002fc0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140002770
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140007040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140002843
cmp byte [rcx + 0x71], 0
je 0x140002843
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000283f
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140002804
sub eax, 1
je 0x140002808
cmp eax, 2
jne 0x14000283f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140002fc0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140002836
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x14000283f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x1400027ec
xor al, al
jmp 0x1400027ec
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140002fc0
add rsp, 0x60
pop rbx
ret

Function at 0x140003940
Capabilities:
Parse pe header

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r15
sub rsp, 0x30
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 8]
xor esi, esi
xor eax, eax
lock cmpxchg qword [0x140125868], rbx
je 0x1400d237c
cmp rax, rbx
jne 0x1400d236f
mov ebx, 1
mov esi, ebx
jmp 0x1400d2381
mov ecx, 0x3e8
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
jmp 0x1400d2354
mov ebx, 1
mov eax, dword [0x140125870]
cmp eax, ebx
jne 0x1400d2397
mov ecx, 0x1f
call fcn.1401bf000
jmp 0x1400d2406
mov eax, dword [0x140125870]
test eax, eax
jne 0x1400d2400
mov dword [0x140125870], ebx
lea r15, [0x1400dea18]
lea rdi, [0x1400dea00]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], eax
cmp rdi, r15
jae 0x1400d23f2
test eax, eax
jne 0x1400d23f6
cmp qword [rdi], 0
je 0x1400d23e7
movabs r10, 0xd30527475e523070
mov rax, qword [rdi]
mov rcx, qword [0x1400de008]
call rcx
mov dword [rsp + 0x20], eax
add rdi, 8
mov qword [rsp + 0x28], rdi
jmp 0x1400d23be
test eax, eax
je 0x1400d2406
mov eax, 0xff
jmp 0x1400d24ec
mov dword [0x1401157a0], ebx
mov eax, dword [0x140125870]
cmp eax, ebx
jne 0x1400d242d
lea rdx, [0x1400de9f8]
lea rcx, [0x1400de018]
call sub.msvcrt.dll__initterm
mov dword [0x140125870], 2
test esi, esi
jne 0x1400d243a
xor eax, eax
xchg qword [0x140125868], rax
cmp qword [0x140125888], 0
je 0x1400d2478
lea rcx, [0x140125888]
call fcn.1400d29a0
test eax, eax
je 0x1400d2478
movabs r10, 0x99012e4578d92870
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
mov rax, qword [0x140125888]
mov r9, qword [0x1400de008]
call r9
mov r8, qword [0x1401157b8]
mov rdx, qword [0x1401157b0]
mov ecx, dword [0x1401157a8]
call fcn.14000c23c
mov dword [0x14011579c], eax
cmp dword [0x1401157c0], 0
jne 0x1400d24a8
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x1401157a0], 0
jne 0x1400d24bd
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x14011579c]
jmp 0x1400d24ec
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
add rsp, 0x30
pop r15
ret
sub rsp, 0x28
call fcn.1400d2a34
add rsp, 0x28
jmp 0x1400d2330

Function at 0x1400d288c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400d28d8
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400d28d0
cmp dword [rcx + 0x3c], edx
jl 0x1400d28d0
cmp dword [rcx + 0x3c], 0x10000000
jae 0x1400d28d0
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp], rax
cmp dword [rax], 0x4550
cmovne rax, rdx
mov rdx, rax
mov qword [rsp], rax
jmp 0x1400d28d8
mov rax, rdx
add rsp, 0x18
ret
Function at 0x140012400
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 0x140012428
mov eax, 0
jmp 0x140012476
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 0x140012451
mov eax, 0
jmp 0x140012476
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 0x140012471
mov eax, 0
jmp 0x140012476
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x14001247c
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 0x1400124fa
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x1400124f1
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 0x1400124f1
mov rax, qword [rbp - 8]
jmp 0x14001250f
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 0x1400124c4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140970d04
Capabilities:
Encode data using xor

Disassembly:
push r11
pushfq
movabs r11, 0x1ba705356a8d302c
and r11b, 0x2e
lea r11, [r11 + r11*2 + 0x3a0a3bcf]
movsxd r11, r11d
xor r11w, 0x5e20
mov r11, qword [rsp + 8]
mov qword [rsp + 8], 0xffffffffebfb6395
jg 0x140970d1d
push qword [rsp]
popfq
lea rsp, [rsp + 8]
call fcn.140ada0a3
Function at 0x39803abd5
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x398161ca8]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x398161ca4]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x39803ac23
mov rdx, qword [rax]
cmp r12, rdx
jb 0x39803ac1b
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x39803ad0c
inc ebx
add rax, 0x28
jmp 0x39803abfb
mov rcx, r12
call fcn.39803b2a5
mov rbp, rax
test rax, rax
jne 0x39803ac42
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.39803ab70
movsxd rbx, ebx
mov rax, qword [0x398161ca8]
imul rbx, rbx, 0x28
add rax, rbx
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.39803b355
mov edx, dword [rbp + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x398161ca8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.DLL_VirtualQuery]
test rax, rax
jne 0x39803aca6
mov rax, qword [0x398161ca8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.39803ab70
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x39803ad06
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x39803ad06
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rbx, qword [0x398161ca8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.DLL_VirtualProtect]
test eax, eax
jne 0x39803ad06
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.39803ab70
inc dword [0x398161ca4]
mov ecx, edi
mov rdi, r12
rep movsb byte [rdi], byte [rsi]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x39803afc0
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x20
lea r13, [0x398161ce0]
mov rcx, r13
call qword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov rbx, qword [0x398161cc0]
test rbx, rbx
je 0x39803b00e
mov ecx, dword [rbx]
call qword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov r12, rax
call qword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jne 0x39803b008
test r12, r12
je 0x39803b008
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
jmp 0x39803afe0
mov rcx, r13
add rsp, 0x20
pop rbx
pop r12
pop r13
jmp qword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]

Function at 0x39803b1d0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x39803b1f3
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
jne 0x39803b1f3
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x39803b1f4
Capabilities:
Enumerate pe sections

Disassembly:
xor r8d, r8d
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r9d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
cmp r9d, r8d
jbe 0x39803b22e
mov r10d, dword [rax + 0xc]
mov rcx, r10
cmp r10, rdx
ja 0x39803b225
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x39803b230
inc r8d
add rax, 0x28
jmp 0x39803b20c
xor eax, eax
ret
Function at 0x39803b2a5
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x398137820]
mov r8, rcx
mov rcx, r9
call fcn.39803b1d0
test eax, eax
je 0x39803b2d1
mov rdx, r8
mov rcx, r9
sub rdx, r9
add rsp, 0x28
jmp fcn.39803b1f4
xor eax, eax
add rsp, 0x28
ret

Function at 0x3980469f2
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.DLL_TlsAlloc]
mov dword [0x39812c138], eax
inc eax
jne 0x398046a0c
call sub.msvcrt.dll_abort
nop
add rsp, 0x28
ret

Function at 0x398046b94
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
mov rbx, rcx
test rcx, rcx
je 0x398046c32
call fcn.39804677a
dec eax
jne 0x398046c2b
xor eax, eax
lea rdi, [rsp + 0x25]
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x4d]
mov ecx, 0x43
rep stosb byte [rdi], al
call qword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
lea rdx, [rsp + 0x4c]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
mov edx, 0x27
lea rcx, [rsp + 0x25]
cmp byte [rcx + rdx], 0
mov eax, edx
je 0x398046c0a
inc rdx
cmp rdx, 0x6b
jne 0x398046bf7
jmp 0x398046c20
cmp edx, 0x6a
je 0x398046c20
inc eax
movsxd rdx, edx
cdqe
mov byte [rsp + rdx + 0x25], 0xa
mov byte [rsp + rax + 0x25], 0
call qword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret

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

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
call fcn.398046c3d
mov ecx, dword [0x39812c138]
call qword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov r12, rax
test rax, rax
jne 0x398046df7
call fcn.398046ae0
cmp qword [0x398167040], 0
mov rbx, rax
je 0x398046df7
test rax, rax
je 0x398046df7
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 [rbx + 0x70], eax
call qword [sym.imp.KERNEL32.DLL_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call fcn.398046b94
mov rsi, qword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rsi
mov qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.DLL_GetCurrentThread]
mov r12, rax
call rsi
mov r8, qword [rsp + 0x48]
lea r9, [rbx + 0x28]
mov rdx, r12
mov dword [rsp + 0x30], 2
mov rcx, rax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.DLL_DuplicateHandle]
test eax, eax
jne 0x398046dbb
call sub.msvcrt.dll_abort
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.DLL_GetThreadPriority]
mov ecx, dword [0x39812c138]
mov rdx, rbx
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
mov al, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
call qword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
je 0x398046db6
mov r12, rbx
mov rax, r12
add rsp, 0x50
pop rbx
pop rsi
pop r12
ret
Function at 0x3980479b7
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
sub rsp, 0x28
mov r13, rcx
call fcn.398046cde
mov qword [rax + 8], r13
mov rcx, qword [rax + 0x1d8]
mov r12, rax
call fcn.398047466
test byte [r12 + 0x40], 0x30
jne 0x3980479f5
lea rcx, [r12 + 0xd0]
mov edx, 1
call qword [sym.imp.msvcrt.dll_longjmp]
mov ecx, dword [0x39812c138]
call qword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov r12, rax
test rax, rax
je 0x398047a95
cmp qword [rax + 0x28], 0
mov rcx, qword [rax + 0x30]
jne 0x398047a39
mov dword [rax], 0xdeadbeef
test rcx, rcx
je 0x398047a29
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov qword [r12 + 0x30], 0
mov r13d, dword [r12 + 8]
jmp 0x398047a7f
mov dword [rax + 0xbc], 1
mov r13d, dword [rax + 8]
test rcx, rcx
je 0x398047a52
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov qword [r12 + 0x30], 0
test byte [r12 + 0x44], 4
je 0x398047a95
mov dword [r12], 0xdeadbeef
mov rcx, qword [r12 + 0x28]
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov qword [r12 + 0x28], 0
mov rcx, r12
call fcn.398046e03
mov ecx, dword [0x39812c138]
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov ecx, r13d
call qword [sym.imp.msvcrt.dll__endthreadex]
nop
Function at 0x3980480ea
Capabilities:
Create thread
Resume thread

Disassembly:
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
mov r13, rdx
mov rsi, r8
mov rdi, r9
call fcn.398046ae0
mov r12, rax
mov eax, 0xb
test r12, r12
je 0x398048300
test rbx, rbx
je 0x398048129
mov rax, qword [r12 + 0x1d8]
mov qword [rbx], rax
mov dword [r12 + 0xbc], 0
mov dword [r12 + 0x44], 1
mov qword [r12 + 0x28], 0xffffffffffffffff
mov qword [r12 + 8], rdi
mov rdi, qword [sym.imp.KERNEL32.DLL_CreateEventA]
mov qword [r12 + 0x10], rsi
xor esi, esi
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call rdi
mov qword [r12 + 0x30], rax
test rax, rax
jne 0x398048189
mov eax, esi
neg eax
sbb ecx, ecx
inc esi
and ecx, 0x14
call qword [sym.imp.KERNEL32.DLL_Sleep]
cmp esi, 5
jne 0x39804815a
mov qword [r12 + 0x38], 0xffffffffffffffff
lea r14, [r12 + 0x68]
mov rcx, r14
call fcn.398046b94
cmp qword [r12 + 0x30], 0
mov dword [r12], 0xbab1f00d
mov dword [r12 + 0xc0], 0
mov dword [r12 + 0xb8], 0
je 0x398048262
xor esi, esi
test r13, r13
je 0x3980481fc
mov eax, dword [r13]
mov rsi, qword [r13 + 0x10]
mov dword [r12 + 0x44], eax
test al, 8
je 0x3980481f0
call fcn.398046cde
mov eax, dword [rax + 0xc0]
jmp 0x3980481f4
mov eax, dword [r13 + 0x18]
mov dword [r12 + 0xc0], eax
lea r8, [0x3980476de]
mov r9, r12
mov edx, esi
xor ecx, ecx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 4
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov r13, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x398048280
mov rcx, qword [r12 + 0x30]
test rcx, rcx
je 0x39804823e
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
lea rcx, [r12 + 0x38]
call fcn.3980465e9
mov rcx, r14
call fcn.398046b94
mov qword [r12 + 0x30], 0
mov qword [r12 + 0x28], 0
test rbx, rbx
je 0x39804826e
mov qword [rbx], 0
mov rcx, r12
call fcn.398046e03
mov eax, 0xb
jmp 0x398048300
mov eax, dword [r12 + 0xc0]
mov edx, 0xfffffff1
cmp eax, 0xfffffff2
jl 0x3980482b0
mov edx, 0xfffffffe
cmp eax, 0xffffffff
jl 0x3980482b0
mov edx, 0xf
cmp eax, 0xe
jg 0x3980482b0
mov edx, 2
cmp eax, edx
cmovle edx, eax
mov rcx, r13
call qword [sym.imp.KERNEL32.DLL_SetThreadPriority]
mov rcx, qword [r12 + 0x30]
call qword [sym.imp.KERNEL32.DLL_ResetEvent]
test byte [r12 + 0x44], 4
mov rax, qword [sym.imp.KERNEL32.DLL_ResumeThread]
je 0x3980482ec
mov qword [r12 + 0x28], 0
mov rcx, r13
call rax
mov rcx, r13
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x3980482f6
mov qword [r12 + 0x28], r13
mov rcx, r13
call rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_Sleep]
xor eax, eax
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret

Function at 0x39804d8f0
Capabilities:
Encode data using xor

Disassembly:
mov eax, ecx
test r8d, r8d
je 0x39804d920
mov r8d, r8d
lea r9, [0x398137be0]
add r8, rdx
nop dword [rax]
movzx ecx, byte [rdx]
add rdx, 1
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [r9 + rcx*4]
cmp rdx, r8
jne 0x39804d908
not eax
ret