joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400728e0
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x140072a88
push rbp
push rdi
push r14
sub rsp, 0x20
mov rbp, qword [rcx]
mov r14, rcx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], r15
mov rdi, qword [rbp + 0x1e0]
lea rsi, [rdi + 0x1cb8]
lea rbx, [rdi + 0x1eb8]
mov qword [rbx], rsi
cmp rsi, rbx
jae 0x140072945
lea rax, [rsi + 1]
mov byte [rsi], 0xff
mov qword [rbx], rax
cmp rax, rbx
jae 0x140072945
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x140072945
mov byte [rax], dl
inc qword [rbx]
movzx ecx, word [rdi + 0x1ca8]
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rdi + 0x1caa]
movzx r15d, ax
mov word [rsp + 0x48], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r9, qword [rbx]
movzx ecx, ax
cmp r9, rbx
jae 0x14007297c
mov byte [r9], r15b
inc qword [rbx]
mov r9, qword [rbx]
mov r15, qword [rsp + 0x58]
cmp r9, rbx
jae 0x1400729d2
movzx eax, byte [rsp + 0x49]
mov byte [r9], al
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1400729d2
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1400729d2
shr cx, 8
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1400729d2
mov byte [r9], 0xff
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1400729d2
mov byte [r9], 0xf0
mov r9, qword [rbx]
inc r9
mov qword [rdi + 0x1ec0], r9
lea r8, [rdi + 0x1cba]
sub r9, rsi
mov qword [rbx], rsi
sub r9, 2
mov edx, 0x3e
mov rcx, rbp
call fcn.140072390
mov rcx, qword [r14 + 0x4c0]
xor r9d, r9d
mov rdx, rsi
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
test eax, eax
jns 0x140072a34
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.14004dae0
lea rdx, [rdi + 0x1cbb]
mov r8d, 4
mov rcx, r14
call fcn.140072760
mov rcx, qword [r14 + 0x4c0]
lea rdx, [rdi + 0x1cbf]
xor r9d, r9d
lea r8d, [r9 + 2]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x140072a80
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.14004dae0
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x1400741f0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x1400b0060]
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 0x140074285
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 0x1400742e6
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.14004dae0
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.1400877d0
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 0x1400743a1
sub ecx, 1
je 0x140074414
sub ecx, 1
je 0x140074350
cmp ecx, 1
je 0x140074333
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rdi
lea rdx, [0x1400933d0]
call fcn.14004dae0
jmp 0x140074414
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.140073f20
test eax, eax
je 0x140074414
jmp 0x1400742ba
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 0x140074414
sub rax, rsi
cmp rax, rbp
jae 0x140074414
mov r8, rsi
lea rdx, str.TFTP_error:__s_n
mov rcx, rdi
call fcn.14004dc60
jmp 0x140074414
cmp r8d, 4
jle 0x140074414
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 0x140074414
lea eax, [r8 - 4]
mov rcx, r14
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.14004da00
mov esi, eax
test eax, eax
je 0x1400743f3
mov edx, 5
mov rcx, rbx
call fcn.140074ee0
mov eax, esi
jmp 0x1400742ba
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.14005d140
mov rcx, r14
call fcn.14005d420
test eax, eax
je 0x1400742b8
mov edx, 5
mov rcx, rbx
call fcn.140074ee0
mov eax, Ordinal_46
jmp 0x1400742ba
Function at 0x1400872f0
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 [section..data]
mov rdi, rax
test rax, rax
jne 0x140087332
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 0x140087379
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 0x1400873d2
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 0x140087390
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x140087413
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x140098bea]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x140098beb]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x1400873e0
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 0x1400874a0
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rdi, rdx
lea r8, [rsp + 0x60]
mov ebx, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
mov r8d, ebx
mov ecx, 0x1300
neg eax
sbb r9d, r9d
and qword [rsp + 0x30], 0
and r9d, dword [rsp + 0x60]
xor edx, edx
and dword [rsp + 0x28], 0
mov dword [rsp + 0x60], r9d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x140087524
mov r8, qword [rdi]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, reloc.WS2_32.dll_accept
cmp byte [rcx + rax], 0
je 0x140087524
dec r8
sub rdx, 1
jne 0x14008750a
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x140001001
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400043e0]
mov rcx, qword [0x140004390]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x1400043f0]
cmp word [rcx], 0x5a4d
mov dword [rax], 1
mov rax, qword [0x140004400]
mov dword [rax], 1
jne 0x140001083
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x140001083
mov ecx, dword [rax + 0x18]
cmp cx, 0x10b
je 0x14000105e
cmp cx, 0x20b
je 0x14000106d
jmp 0x140001083
cmp dword [rax + 0x74], 0xe
jbe 0x140001083
cmp dword [rax + 0xe8], 0
jmp 0x14000107d
cmp dword [rax + 0x84], 0xe
jbe 0x140001083
cmp dword [rax + 0xf8], 0
setne dl
movzx edx, dl
mov rax, qword [0x1400043d0]
mov dword [0x14000700c], edx
mov ecx, 2
cmp dword [rax], 0
jne 0x14000109f
mov ecx, 1
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x1400044a0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x140004480]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140004340]
cmp dword [rax], 1
jne 0x1400010e1
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret

Function at 0x140001360
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
call sym.__main
mov r9d, 0x40
mov r8d, 0x1000
mov edx, 0x48
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400013a9
lea rax, str.allocation_failed
mov rcx, rax
call sym.perror
mov rax, qword [rbp - 8]
mov rcx, qword [section..data]
mov rbx, qword [0x140003008]
mov qword [rax], rcx
mov qword [rax + 8], rbx
mov rcx, qword [0x140003010]
mov rbx, qword [0x140003018]
mov qword [rax + 0x10], rcx
mov qword [rax + 0x18], rbx
mov rcx, qword [0x140003020]
mov rbx, qword [0x140003028]
mov qword [rax + 0x20], rcx
mov qword [rax + 0x28], rbx
mov rcx, qword [0x140003030]
mov rbx, qword [0x140003038]
mov qword [rax + 0x30], rcx
mov qword [rax + 0x38], rbx
mov rdx, qword [0x140003040]
mov qword [rax + 0x40], rdx
mov rax, qword [rbp - 8]
call rax
mov eax, 0
add rsp, 0x38
pop rbx
pop rbp
ret
Function at 0x1400016a4
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x1400070a8]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x1400070a4]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x1400016f2
mov rdx, qword [rax]
cmp r12, rdx
jb 0x1400016ea
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x1400017d9
inc ebx
add rax, 0x28
jmp 0x1400016ca
mov rcx, r12
call sym.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
jne 0x140001711
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
movsxd rbx, ebx
mov rax, qword [0x1400070a8]
xor edx, edx
imul rbx, rbx, 0x28
add rax, rbx
mov dword [rax], edx
mov qword [rax + 0x20], rbp
call sym._GetPEImageBase
mov edx, dword [rbp + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400070a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140001773
mov rax, qword [0x1400070a8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400017d3
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400017d3
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1400070a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400017d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
inc dword [0x1400070a4]
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 0x140001c00
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x140007100]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400070e0]
test rbx, rbx
je 0x140001c4c
mov ecx, dword [rbx]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rsi, rsi
je 0x140001c46
test eax, eax
jne 0x140001c46
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
jmp 0x140001c1e
mov rcx, rdi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140001e00
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140001e23
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
jne 0x140001e23
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x140001e24
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 r8d, r9d
jae 0x140001e5e
mov r10d, dword [rax + 0xc]
mov rcx, r10
cmp rdx, r10
jb 0x140001e55
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x140001e60
inc r8d
add rax, 0x28
jmp 0x140001e3c
xor eax, eax
ret

Function at 0x140001ed1
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x140004390]
mov r8, rcx
mov rcx, r9
call sym._ValidateImageBase
test eax, eax
je 0x140001efd
mov rdx, r8
mov rcx, r9
sub rdx, r9
add rsp, 0x28
jmp sym._FindPESection
xor eax, eax
add rsp, 0x28
ret
Function at 0x1400023a0
Capabilities:
Enumerate process modules

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x4d0
mov rax, qword [0x14000a010]
xor rax, rsp
mov qword [rsp + 0x4c0], rax
mov rbx, rcx
mov edx, dword [rcx + 0x28]
mov ecx, 0x18
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140002534
xor edx, edx
mov r8d, 0x434
lea rcx, [rsp + 0x84]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x80], 0x438
lea rdx, [rsp + 0x80]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_Module32FirstW]
test eax, eax
je 0x140002519
lea rsi, [rbx + 0x38]
xor ebp, ebp
nop word [rax + rax]
mov rbx, qword [rsp + 0x98]
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0x48]
call fcn.1400025d0
nop
movups xmm1, xmmword [rax]
movups xmmword [rsp + 0x20], xmm1
movups xmm0, xmmword [rax + 0x10]
movups xmmword [rsp + 0x30], xmm0
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], 7
mov word [rax], bp
mov qword [rsp + 0x40], rbx
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x68]
mov rcx, rsi
call fcn.140002dc0
nop
mov rdx, qword [rsp + 0x38]
cmp rdx, 8
jb 0x1400024c2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400024bc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002526
call fcn.140005c8c
nop
mov rdx, qword [rsp + 0x60]
cmp rdx, 8
jb 0x140002500
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400024fb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000252d
call fcn.140005c8c
lea rdx, [rsp + 0x80]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_Module32NextW]
test eax, eax
jne 0x140002430
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x140002536
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
xor al, al
mov rcx, qword [rsp + 0x4c0]
xor rcx, rsp
call fcn.140005910
lea r11, [rsp + 0x4d0]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
Function at 0x140003310
Capabilities:
Execute command

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x20
mov rsi, rcx
lea rcx, [0x140007508]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov rdx, qword [rsi + 0x10]
movabs rax, 0x6666666666666667
mov rbx, qword [rsi + 8]
mov edi, 0xffffffff
mov r8, qword [rsi]
sub rdx, rbx
imul rdx
sar rdx, 4
mov rcx, rdx
shr rcx, 0x3f
dec rcx
add rcx, rdx
test r8, r8
jns 0x140003367
mov qword [rsi], rcx
jmp 0x140003373
cmp r8, rcx
jle 0x140003373
mov qword [rsi], 0
mov rbp, qword [rsi + 0x10]
cmp rbx, rbp
je 0x140003432
mov qword [rsp + 0x40], r14
lea r14, [0x14000750c]
mov qword [rsp + 0x48], r15
lea r15, [0x14000751c]
nop dword [rax + rax]
inc edi
movsxd rax, edi
cmp rax, qword [rsi]
jne 0x1400033d7
cmp byte [rbx + 0x20], 0
lea rdx, [0x140007520]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
cmovne rdx, r15
call fcn.140002850
cmp qword [rbx + 0x18], 0x10
mov rdx, rbx
jb 0x1400033d2
mov rdx, qword [rbx]
mov rcx, rax
jmp 0x1400033eb
cmp qword [rbx + 0x18], 0x10
mov rdx, rbx
jb 0x1400033e4
mov rdx, qword [rbx]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov r8, qword [rbx + 0x10]
call fcn.140002c00
cmp byte [rbx + 0x20], 0
lea rdx, [0x140007514]
mov rcx, rax
cmovne rdx, r14
call fcn.140002850
lea rdx, [0x140002a40]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
add rbx, 0x28
cmp rbx, rbp
jne 0x1400033a0
mov r15, qword [rsp + 0x48]
mov r14, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret
Function at 0x140006414
Capabilities:
Parse pe header

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r14
sub rsp, 0x20
xor r14d, r14d
mov rbp, rdx
mov ebx, r14d
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140005dd4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140005dd4
cmp eax, 3
je 0x140005d36
xor edx, edx
mov rcx, rdi
call fcn.140005df0
test eax, eax
jne 0x140005dd4
movzx ecx, word [rdi]
mov rsi, r14
mov rdx, rdi
test cx, cx
je 0x140005dbb
mov r12d, 0x5c
cmp cx, r12w
mov rax, rdx
cmovne rax, rsi
add rdx, 2
mov rsi, rax
movzx ecx, word [rdx]
test cx, cx
jne 0x140005d4a
test rax, rax
je 0x140005dbb
mov rdx, rbp
mov word [rax], r14w
mov rcx, rdi
call fcn.140005cdc
mov word [rsi], r12w
mov ebx, eax
test eax, eax
js 0x140005dd4
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140005db6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140005da6
mov ebx, 1
jmp 0x140005dd4
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140005dd4
mov ebx, r14d
jmp 0x140005dd4
mov ebx, 0x80070003
lea rcx, str.c:_agent_work138_s_srclibsdutildirutil.cpp
mov r8d, ebx
mov edx, 0x72
call fcn.140005770
mov rbp, qword [rsp + 0x48]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop r12
pop rdi
ret

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

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rdx
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140005e1a
test al, 0x10
je 0x140005e1a
test rdi, rdi
je 0x140005e15
mov dword [rdi], eax
invalid

Function at 0x14000ac04
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14000aa30
Function at 0x140008bc8
Capabilities:
Hash data with crc32

Disassembly:
mov rax, qword [rcx + 0x1e8]
mov r10, r8
movsxd r9, dword [rcx + 0x1e0]
mov r11, rdx
mov rcx, r11
mov r8d, dword [rax + r9*4 - 4]
mov eax, r10d
sub eax, edx
neg r10
sbb edx, edx
and edx, eax
jmp fcn.1400095e4

Function at 0x140009274
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x20
movsxd r15, r9d
mov rsi, r8
test r8, r8
je 0x14000929b
and qword [r8], 0
call fcn.1400093b0
mov rbx, rax
test rax, rax
je 0x140009394
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
test eax, eax
jne 0x14000938b
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
movsxd rdi, eax
cmp edi, 0xffffffff
je 0x14000938b
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
test eax, eax
jne 0x14000938b
mov rax, qword [0x140049e70]
mov rbp, rdi
test rax, rax
je 0x140009303
inc dword [rax + 0x3c8]
mov rdx, qword [0x140049e80]
lea rcx, [r15 + rdi]
call qword [section..data]
mov rdi, rax
test rax, rax
je 0x14000938b
mov r9, rbx
mov r8, rbp
mov edx, 1
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, rbp
je 0x140009362
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rax, qword [0x140049e70]
test rax, rax
je 0x140009350
dec dword [rax + 0x3c8]
mov rdx, qword [0x140049e80]
mov rcx, rdi
call qword [0x140048008]
jmp 0x140009394
test r15d, r15d
jle 0x140009375
lea rcx, [rdi + rbp]
mov r8, r15
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test rsi, rsi
je 0x140009386
mov qword [rsi], rbp
mov rax, rdi
jmp 0x140009396
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret
Function at 0x1400095e4
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
cmp dword [0x140049ea4], 0
lea rsi, [0x140049ea0]
mov ebx, r8d
mov edi, edx
mov r10, rcx
jne 0x14000964b
xor r9d, r9d
mov r11, rsi
mov r8d, r9d
mov edx, 8
mov ecx, r8d
mov eax, r8d
and ecx, 1
shr eax, 1
neg ecx
and ecx, 0xedb88320
mov r8d, ecx
xor r8d, eax
sub rdx, 1
jne 0x140009619
mov dword [r11], r8d
inc r9d
add r11, 4
cmp r9d, 0x100
jb 0x140009611
not ebx
mov edx, ebx
test edi, edi
jle 0x14000966d
movzx eax, byte [r10]
inc r10
movzx ecx, dl
xor rcx, rax
shr edx, 8
xor edx, dword [rsi + rcx*4]
sub edi, 1
jne 0x140009653
jmp 0x1400096a7
mov r8b, byte [r10]
inc r10
test r8b, r8b
je 0x1400096a7
mov r9b, 0x23
cmp r8b, r9b
jne 0x14000968c
cmp byte [r10], r9b
jne 0x14000968c
cmp byte [r10 + 1], r9b
cmove edx, ebx
movzx ecx, dl
movzx eax, r8b
mov r8b, byte [r10]
xor rcx, rax
shr edx, 8
inc r10
xor edx, dword [rsi + rcx*4]
test r8b, r8b
jne 0x14000967b
mov rbx, qword [rsp + 8]
not edx
mov rsi, qword [rsp + 0x10]
mov eax, edx
mov rdi, qword [rsp + 0x18]
ret
Function at 0x14000e8dc
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
mov rax, qword [0x140049e70]
mov rbx, rcx
and dword [rax + 0x2d9c], 0
test rcx, rcx
je 0x14000e945
and qword [rsp + 0x30], 0
lea rcx, [rsp + 0x30]
call fcn.14000e950
lea rdx, [0x14003cab4]
mov rcx, rbx
mov rdi, rax
call fcn.1400093b0
mov rbx, rax
test rax, rax
je 0x14000e945
mov r8, qword [rsp + 0x30]
mov r9, rax
mov edx, 1
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret