joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140041ca0
Capabilities:
Get geographical location
Get keyboard layout

Disassembly:
mov qword [rsp + 0x18], rbp
push rsi
sub rsp, 0x70
mov rax, qword [0x140087040]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rsi, qword [0x140089380]
mov rbp, rcx
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x140041ede
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x140041ede
mov qword [rsp + 0x80], rbx
mov ecx, 0x50
mov qword [rsp + 0x88], rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r8, qword [0x140089380]
xor ebx, ebx
mov rdi, rax
test r8, r8
je 0x140041d74
movsx rdx, word [r8 + 0x62d8]
lea rax, [r8 + 0x62dc]
mov r9d, dword [r8 + 0x40a0]
lea rax, [rax + rdx*8]
cmp dword [rax], r9d
je 0x140041d69
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [r8 + 0x62d8], cx
movsx rax, cx
lea rax, [rax*8 + 0x62dc]
add rax, r8
mov dword [rax], r9d
mov dword [rax + 4], ebx
inc word [rax + 4]
inc dword [r8 + 0x62d0]
test rdi, rdi
je 0x140041d91
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
movups xmmword [rdi + 0x10], xmm0
movups xmmword [rdi + 0x20], xmm0
movups xmmword [rdi + 0x30], xmm0
movups xmmword [rdi + 0x40], xmm0
jmp 0x140041d94
mov rdi, rbx
or dword [rsi + 0xc], 0xc06
lea rax, [0x1400787d8]
mov qword [rsi + 0x88], rax
mov qword [rsi + 0x98], rdi
mov qword [rdi], rbp
mov byte [rdi + 0x30], 1
mov rax, qword [rsp + 0x58]
mov qword [rdi + 0x20], rax
mov rax, qword [rsp + 0x60]
mov qword [rdi + 0x18], rax
mov dword [rdi + 0x28], 9
test r8, r8
je 0x140041dde
mov rbp, qword [r8 + 0x98]
jmp 0x140041de1
mov rbp, rbx
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
shr rax, 0x10
mov r9d, 4
movzx ecx, ax
lea r8, [rbp + 0x2c]
mov edx, 0x20001004
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne 0x140041e0c
mov dword [rbp + 0x2c], ebx
mov rax, qword [0x140089380]
mov rcx, qword [rax + 0x4c68]
mov rax, qword [rdi]
mov rdx, qword [rcx]
mov qword [rdx + 0x50], rax
mov qword [rdx + 0x48], rax
test dword [rsi + 8], 0x400
je 0x140041e36
call fcn.140044e60
lea rax, str.xinput1_4.dll
mov byte [rdi + 0x32], 1
mov qword [rsp + 0x30], rax
lea rax, str.xinput1_3.dll
mov qword [rsp + 0x38], rax
lea rax, str.xinput9_1_0.dll
mov qword [rsp + 0x40], rax
lea rax, str.xinput1_2.dll
mov qword [rsp + 0x48], rax
lea rax, str.xinput1_1.dll
mov qword [rsp + 0x50], rax
nop word [rax + rax]
mov rcx, qword [rsp + rbx*8 + 0x30]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
jne 0x140041e9e
inc rbx
cmp rbx, 5
jl 0x140041e80
jmp 0x140041eca
lea rdx, str.XInputGetCapabilities
mov qword [rdi + 0x38], rsi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.XInputGetState
mov rcx, rsi
mov qword [rdi + 0x40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rdi + 0x48], rax
mov rdi, qword [rsp + 0x88]
mov al, 1
mov rbx, qword [rsp + 0x80]
jmp 0x140041ee0
xor al, al
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.14006dde0
mov rbp, qword [rsp + 0x90]
add rsp, 0x70
pop rsi
ret
Function at 0x1400473f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub rsp, 0x38
mov rax, qword [0x140089380]
mov rcx, qword [rax + 0x4fb8]
mov r9, qword [rax + 0x4148]
movups xmm0, xmmword [r9 + 0x278]
movups xmmword [rcx + 0x170], xmm0
mov rax, qword [r9 + 0x2e0]
movups xmm0, xmmword [rcx + 0x150]
movss xmm4, dword [rcx + 0x150]
movss xmm3, dword [rcx + 0x154]
movss xmm2, dword [rcx + 0x158]
movss xmm1, dword [rcx + 0x15c]
movups xmmword [r9 + 0x278], xmm0
movss dword [rsp + 0x20], xmm4
movss dword [rsp + 0x24], xmm3
movss dword [rsp + 0x28], xmm2
movss dword [rsp + 0x2c], xmm1
movss dword [rax + 0x88], xmm4
movss dword [rax + 0x8c], xmm3
movss dword [rax + 0x90], xmm2
movss dword [rax + 0x94], xmm1
mov rax, qword [r9 + 0x2e0]
movups xmm0, xmmword [rsp + 0x20]
movsxd r8, dword [rax + 0x58]
mov rdx, qword [rax + 0x60]
add r8, r8
movups xmmword [rdx + r8*8 - 0x10], xmm0
movzx r8d, word [rcx + 0x232]
mov rcx, qword [rcx + 0x1a0]
mov rdx, qword [r9 + 0x2e0]
add rsp, 0x38
jmp fcn.14003aaf0

Function at 0x1400474d0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub rsp, 0x38
mov rax, qword [0x140089380]
mov rcx, qword [rax + 0x4fb8]
mov r10, qword [rax + 0x4148]
movsxd rax, dword [rcx + 0x74]
movups xmm0, xmmword [rcx + 0x170]
movss xmm4, dword [rcx + 0x170]
movss xmm3, dword [rcx + 0x174]
movss xmm2, dword [rcx + 0x178]
movss xmm1, dword [rcx + 0x17c]
movss dword [rsp + 0x20], xmm4
movss dword [rsp + 0x24], xmm3
movss dword [rsp + 0x28], xmm2
movss dword [rsp + 0x2c], xmm1
imul r9, rax, 0x70
mov rax, qword [r10 + 0x2e0]
add r9, qword [rcx + 0x18]
movups xmmword [r10 + 0x278], xmm0
movss dword [rax + 0x88], xmm4
movss dword [rax + 0x8c], xmm3
movss dword [rax + 0x90], xmm2
movss dword [rax + 0x94], xmm1
mov rax, qword [r10 + 0x2e0]
movups xmm0, xmmword [rsp + 0x20]
movsxd r8, dword [rax + 0x58]
mov rdx, qword [rax + 0x60]
add r8, r8
movups xmmword [rdx + r8*8 - 0x10], xmm0
movzx r8d, word [r9 + 0x5c]
mov rdx, qword [r10 + 0x2e0]
mov rcx, qword [rcx + 0x1a0]
add rsp, 0x38
jmp fcn.14003aaf0
Function at 0x1400588e0
Capabilities:
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x1f0
mov rax, qword [0x140087040]
xor rax, rsp
mov qword [rsp + 0x1e0], rax
mov rdi, rdx
mov rbx, rcx
mov ecx, 0x101
lea rdx, [rsp + 0x40]
mov rsi, r8
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x140058924
mov eax, 0xffffdcd8
jmp 0x140058b1d
movzx eax, word [rsp + 0x40]
cmp al, 1
jne 0x140058b07
shr ax, 8
cmp al, 1
jne 0x140058b07
xorps xmm0, xmm0
mov qword [rsp + 0x228], rbp
xor ecx, ecx
movups xmmword [0x140089e08], xmm0
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov ebp, 2
xor r8d, r8d
mov edx, ebp
mov ecx, ebp
call qword [sym.imp.WS2_32.dll_socket]
mov rcx, rbx
mov qword [0x140089c10], rax
call qword [sym.imp.WS2_32.dll_inet_addr]
mov rcx, rdi
mov word [0x140089c00], bp
mov dword [0x140089c04], eax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov ecx, eax
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, rsi
mov word [0x140089c02], ax
call fcn.140058760
mov dword [0x1400893c0], eax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov ecx, dword [0x1400893c0]
lea rsi, [0x140089c00]
mov dword [0x1400893c4], eax
lea r8d, [rbp + 0xe]
xor eax, eax
mov byte [0x140089e0b], cl
mov qword [0x1400893b8], rax
lea rdx, [0x1400893c0]
mov qword [0x1400897d0], rax
xorps xmm0, xmm0
mov dword [0x1400897d8], eax
xor ebx, ebx
movzx eax, byte [0x1400893c3]
xor r9d, r9d
mov byte [0x140089e08], al
movzx eax, byte [0x1400893c2]
mov byte [0x140089e09], al
mov eax, ecx
mov rcx, qword [0x140089c10]
shr eax, 8
mov dword [rsp + 0x28], recvfrom
mov byte [0x140089e0a], al
mov dword [0x1400893c8], ebx
mov dword [0x1400893cc], 0xaf3c2828
movups xmmword [0x140089388], xmm0
mov qword [rsp + 0x20], rsi
movups xmmword [0x140089398], xmm0
movups xmmword [0x1400893a8], xmm0
call qword [sym.imp.WS2_32.dll_sendto]
lea ecx, [rbp + 0x12]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x140089c10]
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
mov dword [rsp + 0x34], recvfrom
mov dword [rsp + 0x30], 1
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rbp, qword [rsp + 0x228]
test eax, eax
jne 0x140058acd
mov rcx, qword [0x140089c10]
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rdx, [0x1400897e0]
xor r9d, r9d
mov qword [rsp + 0x20], rsi
mov r8d, 0x400
call qword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
test edi, edi
jns 0x140058ad8
mov eax, 0xffffdcdb
jmp 0x140058b1d
mov eax, dword [0x1400893cc]
cmp dword [0x1400897ec], eax
je 0x140058aef
mov ebx, 0xffffdcdc
mov eax, ebx
jmp 0x140058b1d
mov ecx, dword [0x1400893c8]
mov eax, 0xffffdcdd
cmp dword [0x1400897e8], ecx
cmovne ebx, eax
mov eax, ebx
jmp 0x140058b1d
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 0xffffdcd9
mov qword [0x140089c10], 0xffffffffffffffff
mov rcx, qword [rsp + 0x1e0]
xor rcx, rsp
call fcn.14006dde0
add rsp, 0x1f0
pop rdi
pop rsi
pop rbx
ret
Function at 0x140058e30
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbx
sub rsp, 0x50
mov rax, qword [0x140087040]
xor rax, rsp
mov qword [rsp + 0x48], rax
lea eax, [rcx - 0xe0]
xor ebx, ebx
mov r8d, ecx
cmp eax, 7
ja 0x140058edd
add r8d, 0xffffff20
cmp r8d, 7
ja case.default.0x140058e7e
lea rdx, [0x140000000]
movsxd rax, r8d
mov eax, dword [rdx + rax*4 + 0x5908c]
add rax, rdx
jmp rax
or byte [0x1400897d0], 1
jmp case.default.0x140058e7e
or byte [0x1400897d0], 2
jmp case.default.0x140058e7e
or byte [0x1400897d0], 4
jmp case.default.0x140058e7e
or byte [0x1400897d0], 8
jmp case.default.0x140058e7e
or byte [0x1400897d0], 0x10
jmp case.default.0x140058e7e
or byte [0x1400897d0], 0x20
jmp case.default.0x140058e7e
or byte [0x1400897d0], 0x40
jmp case.default.0x140058e7e
or byte [0x1400897d0], 0x80
jmp case.default.0x140058e7e
mov rcx, rbx
lea rdx, [0x140000000]
nop word [rax + rax]
movsx eax, byte [rcx + rdx + 0x897d2]
cmp eax, r8d
je case.default.0x140058e7e
inc rcx
cmp rcx, 0xa
jl 0x140058ef0
mov ecx, ebx
mov rax, rbx
nop dword [rax + rax]
cmp byte [rax + rdx + 0x897d2], bl
je 0x140058f4a
inc ecx
inc rax
cmp rax, 0xa
jl 0x140058f10
movsd xmm0, qword [0x1400897d3]
movzx eax, byte [0x1400897db]
movsd qword [0x1400897d2], xmm0
mov byte [0x1400897da], al
mov byte [0x1400897db], r8b
jmp case.default.0x140058e7e
movsxd rax, ecx
mov byte [rax + rdx + 0x897d2], r8b
cmp qword [0x140089c10], rbx
ja 0x140058f76
mov eax, 0xffffdcd8
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14006dde0
add rsp, 0x50
pop rbx
ret
inc dword [0x1400893c8]
mov dword [0x1400893cc], 0x123c2c2f
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
movsd xmm0, qword [0x1400897d1]
lea rdx, [0x1400893c0]
mov rcx, qword [0x140089c10]
xor r9d, r9d
mov dword [0x1400893c4], eax
movzx eax, byte [0x1400897d0]
mov byte [0x1400893d0], al
movzx eax, word [0x1400897d9]
lea r8d, [r9 + 0x1c]
mov word [0x1400893d9], ax
movzx eax, byte [0x1400897db]
mov byte [0x1400893db], al
lea rax, [0x140089c00]
mov dword [rsp + 0x28], recvfrom
mov qword [rsp + 0x20], rax
movsd qword [0x1400893d1], xmm0
call qword [sym.imp.WS2_32.dll_sendto]
mov rcx, qword [0x140089c10]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, [0x1400897e0]
lea rax, [rsp + 0x38]
mov dword [rsp + 0x30], recvfrom
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov r8d, 0x400
call qword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jns 0x14005904e
mov eax, 0xffffdcdb
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14006dde0
add rsp, 0x50
pop rbx
ret
mov eax, dword [0x1400893cc]
cmp dword [0x1400897ec], eax
je 0x140059063
mov ebx, 0xffffdcdc
jmp 0x140059077
mov ecx, dword [0x1400893c8]
mov eax, 0xffffdcdd
cmp dword [0x1400897e8], ecx
cmovne ebx, eax
mov eax, ebx
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14006dde0
add rsp, 0x50
pop rbx
ret
Function at 0x1400590b0
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbx
sub rsp, 0x50
mov rax, qword [0x140087040]
xor rax, rsp
mov qword [rsp + 0x48], rax
xor ebx, ebx
lea r11, [0x1400897d2]
mov r9d, ebx
mov eax, ebx
movsx edx, byte [rax + r11]
lea r10d, [r9 + 1]
cmp edx, ecx
je 0x1400590ee
inc rax
mov r9d, r10d
cmp rax, 0xa
jl 0x1400590d3
jmp 0x140059110
mov eax, 9
movsxd rdx, r10d
sub eax, r9d
movsxd rcx, r9d
movsxd r8, eax
add rdx, r11
add rcx, r11
call sub.VCRUNTIME140.dll_memcpy
mov byte [0x1400897db], bl
cmp qword [0x140089c10], rbx
ja 0x140059131
mov eax, 0xffffdcd8
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14006dde0
add rsp, 0x50
pop rbx
ret
inc dword [0x1400893c8]
mov dword [0x1400893cc], 0x123c2c2f
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
movsd xmm0, qword [0x1400897d1]
lea rdx, [0x1400893c0]
mov rcx, qword [0x140089c10]
xor r9d, r9d
mov dword [0x1400893c4], eax
movzx eax, byte [0x1400897d0]
mov byte [0x1400893d0], al
movzx eax, word [0x1400897d9]
lea r8d, [r9 + 0x1c]
mov word [0x1400893d9], ax
movzx eax, byte [0x1400897db]
mov byte [0x1400893db], al
lea rax, [0x140089c00]
mov dword [rsp + 0x28], recvfrom
mov qword [rsp + 0x20], rax
movsd qword [0x1400893d1], xmm0
call qword [sym.imp.WS2_32.dll_sendto]
mov rcx, qword [0x140089c10]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, [0x1400897e0]
lea rax, [rsp + 0x38]
mov dword [rsp + 0x30], recvfrom
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov r8d, 0x400
call qword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jns 0x140059209
mov eax, 0xffffdcdb
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14006dde0
add rsp, 0x50
pop rbx
ret
mov eax, dword [0x1400893cc]
cmp dword [0x1400897ec], eax
je 0x14005921e
mov ebx, 0xffffdcdc
jmp 0x140059232
mov ecx, dword [0x1400893c8]
mov eax, 0xffffdcdd
cmp dword [0x1400897e8], ecx
cmovne ebx, eax
mov eax, ebx
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14006dde0
add rsp, 0x50
pop rbx
ret
Function at 0x1400594b0
Capabilities:
Encode data using xor
Encrypt data using tea

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
push r15
mov eax, dword [rcx + 0x7c]
lea r15, [0x140089e08]
mov rsi, rcx
xor edi, edi
mov r14b, 6
nop word [rax + rax]
add edi, 0x9e3779b9
add r14b, 0xff
mov ebp, edi
shr ebp, 2
and ebp, 3
xor bl, bl
nop dword [rax]
nop dword [rax + rax]
movzx r9d, bl
mov ecx, eax
shr ecx, 5
lea r11, [rsi + r9*4]
inc bl
mov r8d, dword [rsi + r9*4 + 4]
and r9d, 3
xor r9, rbp
mov edx, r8d
shr edx, 3
lea r10d, [r8*4]
xor r10d, ecx
mov ecx, eax
xor eax, dword [r15 + r9*4]
shl ecx, 4
xor edx, ecx
mov ecx, edi
xor ecx, r8d
add r10d, edx
add eax, ecx
xor r10d, eax
add dword [r11], r10d
mov eax, dword [r11]
cmp bl, 0x1f
jb 0x140059500
mov r8d, dword [rsi]
mov ecx, eax
shr ecx, 5
and ebx, 3
xor rbx, rbp
mov edx, r8d
shr edx, 3
lea r9d, [r8*4]
xor r9d, ecx
mov ecx, eax
xor eax, dword [r15 + rbx*4]
shl ecx, 4
xor edx, ecx
mov ecx, edi
xor ecx, r8d
add r9d, edx
add eax, ecx
xor r9d, eax
add dword [rsi + 0x7c], r9d
mov eax, dword [rsi + 0x7c]
test r14b, r14b
jne 0x1400594e0
mov rbx, qword [rsp + 0x18]
mov rbp, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x28]
mov rdi, qword [rsp + 0x30]
pop r15
pop r14
ret

Function at 0x14005d1c0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x40
mov rax, qword [0x140087040]
xor rax, rsp
mov qword [rsp + 0x38], rax
movzx esi, r9b
mov rbp, r8
movzx edi, dl
lea r15d, [rsi + 4]
mov ecx, r15d
call fcn.14006e168
mov r8d, esi
mov rdx, rbp
mov r14, rax
mov byte [rax], 0xbe
lea rcx, [rax + 3]
mov byte [rax + 1], dil
mov byte [rax + 2], sil
call sub.VCRUNTIME140.dll_memcpy
mov byte [r15 + r14 - 1], 0xed
lea r9, [rsp + 0x30]
mov rcx, qword [0x140087108]
mov r8d, r15d
mov rdx, r14
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14005d248
cmp dword [rsp + 0x30], r15d
jne 0x14005d248
xor bl, bl
jmp 0x14005d24a
mov bl, 1
mov rcx, r14
call fcn.14006de00
movzx eax, bl
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14006dde0
mov rbx, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x14005d280
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
mov rax, qword [0x140087040]
xor rax, rsp
mov qword [rsp + 0x38], rax
xor edi, edi
mov byte [rsp + 0x30], 0
mov ebx, edi
mov byte [rsp + 0x33], 0
mov rbp, r8
mov byte [rsp + 0x32], 0
movzx esi, dl
mov byte [rsp + 0x31], 0
mov rcx, qword [0x140087108]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x31]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14005d406
cmp dword [rsp + 0x34], 1
jne 0x14005d406
cmp byte [rsp + 0x31], 0xbe
je 0x14005d30d
inc rbx
cmp rbx, 0x40
jb 0x14005d2c1
mov al, 6
jmp 0x14005d408
mov rcx, qword [0x140087108]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x32]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14005d406
cmp dword [rsp + 0x34], 1
jne 0x14005d406
movzx eax, byte [rsp + 0x32]
cmp al, sil
je 0x14005d350
test al, al
jne 0x14005d306
mov rcx, qword [0x140087108]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14005d406
cmp dword [rsp + 0x34], 1
jne 0x14005d406
movzx eax, byte [rsp + 0x30]
cmp al, 1
ja 0x14005d406
test al, al
je 0x14005d3bb
mov rcx, qword [0x140087108]
lea r9, [rsp + 0x34]
mov r8d, eax
mov qword [rsp + 0x20], rdi
mov rdx, rbp
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14005d406
cmp dword [rsp + 0x34], ebx
jne 0x14005d406
mov rcx, qword [0x140087108]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x33]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14005d406
cmp dword [rsp + 0x34], 1
jne 0x14005d406
cmp byte [rsp + 0x33], 0xed
jne 0x14005d306
cmp byte [rsp + 0x30], 1
mov eax, 6
cmovne edi, eax
movzx eax, dil
jmp 0x14005d408
mov al, 1
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14006dde0
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
Function at 0x140065eb0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
sub rsp, 0x40
mov rax, qword [0x140087040]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rsi, rdx
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rdx + rbx], 0
jne 0x140065ed3
mov rax, qword [0x140087120]
mov qword [rsp + 0x50], rdi
cmp rax, 0xffffffffffffffff
jne 0x140065ef2
xor edi, edi
jmp 0x140065f63
mov rcx, qword [0x140087120]
lea rdx, [rsp + 0x34]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ClearCommError]
test eax, eax
je 0x140065f24
cmp dword [rsp + 0x34], 0
jbe 0x140065f24
mov rcx, qword [0x140087120]
mov edx, 5
call qword [sym.imp.KERNEL32.dll_PurgeComm]
mov rcx, qword [0x140087120]
lea rax, [0x140087198]
xor edi, edi
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
mov dword [rsp + 0x30], edi
mov r8d, ebx
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140065f5f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x140065f63
mov edi, dword [rsp + 0x30]
mov eax, edi
mov rdi, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14006dde0
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop rsi
ret

Function at 0x140066010
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x50
mov rax, qword [0x140087040]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rax, qword [rcx + 0x10]
mov rbx, rcx
cmp rax, 0xffffffffffffffff
je 0x140066038
mov rax, qword [rcx]
call qword [rax + 0x18]
mov rcx, qword [rbx + 0x30]
xor r9d, r9d
mov qword [rsp + 0x30], 0
xor r8d, r8d
mov dword [rsp + 0x28], 0x40000080
mov edx, 0xc0000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx + 0x10], rax
mov rax, qword [rbx + 0x10]
cmp rax, 0xffffffffffffffff
je 0x1400660c6
lea rax, [rsp + 0x40]
mov byte [rbx + 0xbc], 1
mov qword [rsp + 0x28], rax
lea r8, [0x140066190]
mov r9, rbx
mov dword [rsp + 0x20], 0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0xa8], rax
mov rax, qword [rbx + 0xa8]
test rax, rax
jne 0x1400660db
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x10], 0xffffffffffffffff
xor al, al
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14006dde0
add rsp, 0x50
pop rbx
ret
mov al, 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14006dde0
add rsp, 0x50
pop rbx
ret
Function at 0x1400660f0
Capabilities:
Terminate thread

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [rcx + 0x10]
mov rbx, rcx
cmp rax, 0xffffffffffffffff
je 0x140066189
mov byte [rcx + 0xbc], 0
xor edx, edx
mov rcx, qword [rcx + 0x10]
call qword [sym.imp.KERNEL32.dll_SetCommMask]
mov rcx, qword [rbx + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rbx + 0xa8]
mov edx, 0x64
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14006614c
mov rcx, qword [rbx + 0xa8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0xa8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0xe0]
mov qword [rbx + 0xa8], 0
mov qword [rbx + 0x10], 0xffffffffffffffff
add rsp, 0x20
pop rbx
jmp qword [sym.imp.KERNEL32.dll_ResetEvent]
add rsp, 0x20
pop rbx
ret

Function at 0x14006c4d0
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 0x14006c4f8
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 0x14006c51e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x14006c520
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x14006c579
test ecx, ecx
jle 0x14006c559
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 0x14006c579
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x14006c579
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
Function at 0x14006c5a0
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 0x14006c5c2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x14006c5d8
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 0x14006c5f4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x14006c5f6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x14006c632
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 0x14006c6ce
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14006c66d
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 0x14006c6ae
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 0x14006c6ce
cmp rbx, rax
ja 0x14006c680
test rbx, rbx
je 0x14006c6ce
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