joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140093ef0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x1400cd080]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rbx, qword [rcx + 0xa00]
lea rax, [rsp + 0x30]
mov rdi, qword [rcx]
mov r14, rcx
mov dword [rsp + 0x30], 0x80
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov r8d, dword [rbx + 0x15c]
mov rdx, qword [rbx + 0x168]
add r8d, 4
mov rcx, qword [rbx + 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rbx + 0x150], 0
mov dword [rbx + 0x154], eax
jne 0x140093f85
movsxd r8, dword [rsp + 0x30]
lea rcx, [rbx + 0xd0]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rbx + 0x150], eax
mov r8d, dword [rbx + 0x154]
mov qword [rsp + 0xf8], rbp
mov qword [rsp + 0x100], rsi
cmp r8d, 4
jge 0x140093fe6
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.1400732c0
mov dword [rbx + 0xc], 7
xor eax, eax
mov rsi, qword [rsp + 0x100]
mov rbp, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.1400a69c0
add rsp, 0xd0
pop r14
pop rdi
pop rbx
ret
mov rdx, qword [rbx + 0x168]
movzx eax, byte [rdx]
movzx ecx, byte [rdx + 1]
shl eax, 8
or ecx, eax
mov dword [rbx + 0xc], ecx
sub ecx, 3
je 0x1400940a1
sub ecx, 1
je 0x140094114
sub ecx, 1
je 0x140094050
cmp ecx, 1
je 0x140094033
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rdi
lea rdx, [0x1400b8858]
call fcn.1400732c0
jmp 0x140094114
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.140093c20
test eax, eax
je 0x140094114
jmp 0x140093fba
movzx ecx, byte [rdx + 2]
lea eax, [r8 - 4]
movsxd rbp, eax
lea rsi, [rdx + 4]
movzx eax, byte [rdx + 3]
mov r8, rbp
shl ecx, 8
xor edx, edx
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x140094114
sub rax, rsi
cmp rax, rbp
jae 0x140094114
mov r8, rsi
lea rdx, str.TFTP_error:__s_n
mov rcx, rdi
call fcn.140073440
jmp 0x140094114
cmp r8d, 4
jle 0x140094114
movzx eax, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
shl ecx, 8
or ecx, eax
movzx eax, word [rbx + 0x48]
inc eax
movzx eax, ax
cmp eax, ecx
jne 0x140094114
lea eax, [r8 - 4]
mov rcx, r14
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.1400731e0
mov esi, eax
test eax, eax
je 0x1400940f3
mov edx, 5
mov rcx, rbx
call fcn.140094be0
mov eax, esi
jmp 0x140093fba
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.14007d690
mov rcx, r14
call fcn.14007d970
test eax, eax
je 0x140093fb8
mov edx, 5
mov rcx, rbx
call fcn.140094be0
mov eax, Ordinal_46
jmp 0x140093fba
Function at 0x1400a6870
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ebp, r8d
mov r14, rdx
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
add rax, 0x18
add rcx, rax
call qword [str.r_n_]
mov rdi, rax
test rax, rax
jne 0x1400a68b2
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rsi
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x1400a68f9
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + reloc.WS2_32.dll_htonl]
mov r14d, dword [rbx + 0x18]
add r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov rcx, qword [rdi + 8]
mov ebp, dword [rbx + 0x20]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x1400a6952
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + reloc.WS2_32.dll_htonl]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rdi + 0x10]
call qword [rbx + reloc.WS2_32.dll_htonl]
sub rbp, 1
jne 0x1400a6910
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x1400a6993
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x1400b78a2]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1400b78a3]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x1400a6960
mov rsi, qword [rsp + 0x48]
mov rax, rdi
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret

Function at 0x1400a7774
Capabilities:
Parse pe header

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

Disassembly:
cld
pop r11
jmp 0x10040bbad
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x10040bbbd
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x10040bba5
lea eax, [rcx + 1]
call r11
adc eax, eax
add ebx, ebx
jne 0x10040bbd5
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x10040bbc2
sub eax, 3
jb 0x10040bbef
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x10040bc26
movsxd rbp, eax
lea eax, [rcx + 1]
call r11
adc ecx, ecx
call r11
adc ecx, ecx
jne 0x10040bc16
mov ecx, eax
add eax, 2
call r11
adc ecx, ecx
add ebx, ebx
jne 0x10040bc14
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x10040bc03
cmp rbp, 0xfffffffffffff300
adc ecx, eax
call fcn.10040bb62
jmp 0x10040bbad
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0xe00
mov dl, 1
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x10040bc72
cmp rsi, rcx
jae 0x10040bc7a
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x10040bc59
cmp al, 0x8f
ja 0x10040bc59
cmp byte [rsi - 2], 0xf
je 0x10040bc5f
sub al, 0xe8
cmp al, 1
ja 0x10040bc43
cmp rsi, rcx
jae 0x10040bc7a
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x10040bc49
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x10040bc7a
lodsb al, byte [rsi]
jmp 0x10040bc59
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x9000]
mov eax, dword [rdi]
or eax, eax
je 0x10040bcd7
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0xb4ec]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x10040bc87
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x10040bcd1
mov qword [rbx], rax
add rbx, 8
jmp 0x10040bca7
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x1af]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x10040bd2f
sub rsp, 0xffffffffffffff80
jmp section.UPX0
Function at 0xc930d0
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0xc930dd
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0xc930ed
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0xc930d5
lea eax, [rcx + 1]
jmp 0xc930fb
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0xc9310e
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0xc930f4
sub eax, 3
jb 0xc9312e
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0xc9317d
sar eax, 1
movsxd rbp, eax
jb 0xc93164
jmp 0xc9313c
add ebx, ebx
jne 0xc9313a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0xc93164
inc ecx
add ebx, ebx
jne 0xc9314a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0xc93164
call r11
adc ecx, ecx
add ebx, ebx
jne 0xc9315d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0xc9314c
add ecx, 2
jmp 0xc93169
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.00c93092
jmp 0xc930dd
pop rsi
pop rdi
pop rax
mov dword [rdi], eax
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x3cc200
mov dl, 0xbe
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0xc931cd
cmp rsi, rcx
jae 0xc931d5
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0xc931b4
cmp al, 0x8f
ja 0xc931b4
cmp byte [rsi - 2], 0xf
je 0xc931ba
sub al, 0xe8
cmp al, 1
ja 0xc9319e
cmp rsi, rcx
jae 0xc931d5
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0xc931a4
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0xc931d5
lodsb al, byte [rsi]
jmp 0xc931b4
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x888000]
mov eax, dword [rdi]
or eax, eax
je 0xc93232
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x893000]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0xc931e2
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0xc9322c
mov qword [rbx], rax
add rbx, 8
jmp 0xc93202
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0xc93276
cmp al, 0xef
ja 0xc9325e
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0xc9323e
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
or eax, eax
jne 0xc9324d
mov eax, dword [rdi]
add rdi, 4
jmp 0xc9324d
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x1af]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
mov byte [fcn.00c932f5], 0xfc
lea rcx, [rsi - 0x1000]
push 1
pop rdx
xor r8, r8
push rax
call fcn.00c932f5
pop rax
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0xc932e5
sub rsp, 0xffffffffffffff80
jmp 0x4014e0
Function at 0x14005fe6c
Capabilities:
Get hostname

Disassembly:
mov rax, rsp
mov dword [rax + 8], ecx
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x60
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov rdi, rdx
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x20], xmm0
xor esi, esi
mov qword [rbp - 0x10], rsi
mov dword [rbp + 0x30], esi
lea r8, [rbp + 0x30]
xor edx, edx
lea ecx, [rsi + 3]
call qword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
je 0x14005feb4
lea ebx, [rsi + 0xd]
jmp 0x14005ff1f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 0xea
jne 0x14005ff1f
mov word [rbp + 0x20], si
mov edx, dword [rbp + 0x30]
lea rax, [rbp - 0x20]
mov qword [rbp - 0x30], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x28], rax
movaps xmm0, xmmword [rbp - 0x30]
movdqa xmmword [rbp - 0x30], xmm0
lea r8, [rbp - 0x30]
lea rcx, [rbp - 0x20]
call fcn.14003cffc
lea r8, [rbp + 0x30]
mov rdx, qword [rbp - 0x20]
mov ecx, 3
call qword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
jne 0x14005ff11
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x14005ff1f
mov rdx, qword [rbp - 0x20]
mov rcx, rdi
call fcn.1400033fc
mov ebx, esi
lea rcx, [rbp - 0x20]
call fcn.1400174fc
mov eax, ebx
mov rbx, qword [rsp + 0x88]
add rsp, 0x60
pop rdi
pop rsi
pop rbp
ret

Function at 0x140060a48
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x1400bd0c0], eax
call fcn.140060cf8
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x1400bd0c0], 0
jne case.default.0x140060a9e
mov ecx, 1
call fcn.140060cf8
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]
stc
and al, 0x50
dec dword [ebp - 0x60c25634]
xchg esp, eax
in al, dx
pop rdx
sbb al, 0xc
jge 0x140125f07
jbe 0x140125e99
jmp qword [rcx + 0x403ef662]
outsd dx, dword [rsi]
neg dword [rcx - 0x4815689d]
jp 0x140125ece
cmp byte [0x1a37b47d3], al
popfq
adc al, 0x59
jnp 0x140125ec4
mov ecx, 0x7a5fdf51
xchg edx, eax
insd dword [rdi], dx
or al, byte [rbx]
invalid
clc
jp 0x140125ec5
mov al, 0x47
and byte [rdx - 0x74847c53], dl
mov edi, 0x886e4924
mov edi, dword [rdi - 0x7791b6dc]
and ch, 0xf6
jle 0x140125eed
invalid
int 6
jne 0x140125f4b
invalid
add dword [rdx], 0x4d06e9a8
invalid
add ebx, esp
or ch, cl
sub eax, 0x405034f7
mov eax, gs
insd dword [rdi], dx
out 0xdc, al
jae 0x140125f7d
push rdi
mov ah, bh
adc al, 0xc4
invalid
invalid
outsd dx, dword [rsi]
pop rsp
fsub st(1), st(0)
jae 0x140125fd2
jb 0x140125fbf
add al, byte [rbx + 0x16]
imul ecx, dword [rsi - 1], 0xffffffa8
invalid
xor dword [rbx - 0x32], eax
in eax, 0xe
mov dl, 0x93
fdivrp st(6)
mov eax, 0x6e438ddf
pop rdi
jmp 0x140125f62
invalid
Function at 0x140001480
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x14002d3e0]
mov dword [rax], 1
mov rax, qword [0x14002d3f0]
mov dword [rax], 1
mov rax, qword [0x14002d400]
mov dword [rax], 1
mov rax, qword [0x14002d3d0]
mov dword [rax], 1
mov rax, qword [0x14002d230]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400014de
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x14000150a
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x140001530
cmp eax, 0x20b
je 0x140001557
jmp 0x140001586
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x140001543
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x14000158b
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x140001572
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x14000158b
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x140002bac
Capabilities:
Write file on windows

Disassembly:
push r12
sub rsp, 0x20
mov rax, qword [0x1400487c8]
test rax, rax
je 0x140002bc0
call rax
mov ecx, 2
call qword [fcn.140019150]
mov r8d, 0xe
mov edx, 1
lea rcx, str.out_of_memory_n
mov r12, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, r12
call sub.msvcrt.dll_fflush
mov ecx, 1
call sub.msvcrt.dll_exit
nop

Function at 0x14000508b
Capabilities:
Write file on windows

Disassembly:
push r12
sub rsp, 0x20
mov rax, qword [0x14003ee20]
cmp rax, 0xdab
jle 0x1400050da
mov ecx, 2
call qword [fcn.140019150]
mov r8d, 0x4b
mov edx, 1
lea rcx, str._GC__cannot_register_thread_local_variable__too_many_thread_local_variables
mov r12, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, r12
call sub.msvcrt.dll_fflush
mov ecx, 1
call sub.msvcrt.dll_exit
lea rdx, [0x1400380c0]
mov qword [rdx + rax*8], rcx
inc rax
mov qword [0x14003ee20], rax
add rsp, 0x20
pop r12
ret

Function at 0x1400079d3
Capabilities:
Allocate or change rwx memory
Copy file
Delete file
Execute shellcode via indirect call

Disassembly:
push r12
push rbx
sub rsp, 0x48
mov r9d, 0x40
mov r8d, 0x1000
mov r12, rcx
mov rbx, rdx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdx, r12
mov r8, rbx
lea r12, str.C:WindowsTemp_backup.log
mov rcx, rax
call sub.msvcrt.dll_memmove
mov rcx, r12
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x38], 0
mov r9, rax
mov eax, 0x8000001
shl rax, 5
mov qword [rsp + 0x30], r9
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea r8, [rsp + 0x20]
mov rdx, r12
lea rcx, str.C:WindowsDirectX.log
call qword [sym.imp.KERNEL32.dll_CopyFile2]
nop
Function at 0x1400115a0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call fcn.140019150
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.140019150
mov r8, rbx
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop

Function at 0x1400121d2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400492c8]
test eax, eax
je 0x14001226a
lea rax, [0x1400492a0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400492d0]
mov qword [rbp - 8], rax
jmp 0x14001224e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x140012242
cmp qword [rbp - 0x10], 0
je 0x140012242
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140012208
lea rax, [0x1400492a0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14001226b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140012370
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 0x140012398
mov eax, 0
jmp 0x1400123e6
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 0x1400123c1
mov eax, 0
jmp 0x1400123e6
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 0x1400123e1
mov eax, 0
jmp 0x1400123e6
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x1400123ec
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 0x14001246a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140012461
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 0x140012461
mov rax, qword [rbp - 8]
jmp 0x14001247f
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 0x140012434
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x14001a584
Capabilities:
Print debug messages

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x90
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
cmp qword [rbp + 0x10], 0
je 0x14001a6ce
mov rcx, qword [rbp + 0x10]
call fcn.14001eb5d
cmp eax, 1
jne 0x14001a6c1
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rdx
movabs rax, 0x6b5f6e6970732070
movabs rdx, 0x20726f6620737965
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rdx
movabs rax, 0x20646165726874
mov edx, 0
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rdx
mov qword [rbp - 0x40], 0
mov qword [rbp - 0x38], 0
mov qword [rbp - 0x30], 0
mov qword [rbp - 0x28], 0
mov qword [rbp - 0x20], 0
mov qword [rbp - 0x18], 0
mov qword [rbp - 0x10], 0
mov word [rbp - 8], 0
mov byte [rbp - 6], 0
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call rax
mov ecx, eax
lea rax, [rbp - 0x70]
add rax, 0x27
mov r8d, 0xa
mov rdx, rax
mov rax, qword [sym.imp.msvcrt.dll__ultoa]
call rax
mov dword [rbp - 4], 0x27
jmp 0x14001a677
add dword [rbp - 4], 1
mov eax, dword [rbp - 4]
cdqe
movzx eax, byte [rbp + rax - 0x70]
test al, al
je 0x14001a68d
mov eax, dword [rbp - 4]
cmp eax, 0x69
jbe 0x14001a673
mov eax, dword [rbp - 4]
cmp eax, 0x69
ja 0x14001a6ac
mov eax, dword [rbp - 4]
cdqe
mov byte [rbp + rax - 0x70], 0xa
mov eax, dword [rbp - 4]
add eax, 1
cdqe
mov byte [rbp + rax - 0x70], 0
lea rax, [rbp - 0x70]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call rax
call sub.msvcrt.dll_abort
mov rax, qword [rbp + 0x10]
mov rdx, qword [rbp + 0x18]
mov qword [rax], rdx
jmp 0x14001a6cf
nop
add rsp, 0x90
pop rbp
ret
Function at 0x14001b8c5
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov qword [rbp - 8], 0xffffffffffffffff
lea rax, [0x14001b6eb]
mov rdx, rax
lea rax, [0x140049d50]
mov rcx, rax
call fcn.14001acf6
mov eax, dword [0x1400284f0]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x14001b918
mov rax, qword [rbp - 0x10]
jmp 0x14001ba78
call fcn.14001a460
mov qword [rbp - 0x10], rax
mov rax, qword [0x14004c050]
test rax, rax
je 0x14001b934
cmp qword [rbp - 0x10], 0
jne 0x14001b93e
mov eax, 0
jmp 0x14001ba78
mov rax, qword [rbp - 0x10]
mov dword [rax + 0x44], 1
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call rax
mov rdx, qword [rbp - 0x10]
mov dword [rdx + 0x70], eax
mov r9d, 0
mov r8d, 0
mov edx, 1
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateEventA]
call rax
mov rdx, qword [rbp - 0x10]
mov qword [rdx + 0x30], rax
mov rax, qword [rbp - 0x10]
mov qword [rax + 0x38], 0xffffffffffffffff
mov rax, qword [rbp - 0x10]
lea rcx, [rax + 0x68]
mov rax, qword [rbp - 8]
mov rdx, rax
call fcn.14001a584
mov rax, qword [rbp - 0x10]
mov dword [rax + 0xb8], 0
mov rax, qword [rbp - 0x10]
mov qword [rax + 0x28], 0
mov rax, qword [rbp - 0x10]
lea rdi, [rax + 0x28]
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov rsi, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentThread]
call rax
mov rbx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9, rdi
mov r8, rsi
mov rdx, rbx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_DuplicateHandle]
call rax
test eax, eax
jne 0x14001ba19
call sub.msvcrt.dll_abort
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetThreadPriority]
call rax
mov rdx, qword [rbp - 0x10]
mov dword [rdx + 0xc0], eax
mov rax, qword [rbp - 0x10]
mov dword [rax + 0xbc], 0
mov rax, qword [rbp - 0x10]
movzx edx, byte [rax + 0x40]
and edx, 0xffffffcf
or edx, 0x10
mov byte [rax + 0x40], dl
mov eax, dword [0x1400284f0]
mov rdx, qword [rbp - 0x10]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsSetValue]
call rax
test eax, eax
jne 0x14001ba74
call sub.msvcrt.dll_abort
mov rax, qword [rbp - 0x10]
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
ret