joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400bb2c8
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x1400bb2f8
xor eax, eax
jmp 0x1400bb3bb
mov rbp, rbx
cmp word [rax], si
je 0x1400bb31d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1400bb304
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1400bb300
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.1400bb1e8
movsxd r14, eax
mov rcx, r14
test eax, eax
jne 0x1400bb35e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1400bb2f1
call fcn.1400b7230
mov rdi, rax
test rax, rax
jne 0x1400bb374
xor ecx, ecx
call fcn.1400b5950
jmp 0x1400bb353
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.1400bb1e8
test eax, eax
jne 0x1400bb3a5
mov rcx, rdi
call fcn.1400b5950
jmp 0x1400bb3af
xor ecx, ecx
call fcn.1400b5950
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x1400c0170
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.1400b43b0
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1400b43b0
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1400c02bd
cmp rax, 0xffffffffffffffff
je 0x1400c02bd
xor edi, edi
test rbp, rbp
jle 0x1400c026b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1400b58d0
mov rbx, rax
test rax, rax
jne 0x1400c01f8
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x1400c0261
mov edx, 0x8000
mov ecx, r14d
call fcn.1400b3ddc
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.1400b6afc
cmp eax, 0xffffffff
je 0x1400c0241
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1400c0208
mov edx, r15d
mov ecx, r14d
call fcn.1400b3ddc
jmp 0x1400c0261
cmp byte [rsi + 0x38], dil
je 0x1400c0258
cmp dword [rsi + 0x34], 5
jne 0x1400c0258
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x1400c0261
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.1400b5950
jmp 0x1400c02cf
jns 0x1400c02cf
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1400b43b0
cmp rax, 0xffffffffffffffff
jne 0x1400c0289
cmp byte [rsi + 0x30], dil
je 0x1400c02cf
jmp 0x1400c02c5
mov ecx, r14d
call fcn.1400bbd54
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1400c02cf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x1400c02cf
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1400c02ca
mov edi, dword [rsi + 0x2c]
jmp 0x1400c02cf
mov edi, 0x16
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1400b43b0
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x1400c1120
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400c1148
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400c1148
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x100002d58
Capabilities:
Query or enumerate registry key

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x280
mov rax, qword [0x10000b108]
xor rax, rsp
mov qword [rsp + 0x270], rax
and qword [rsp + 0x48], 0
and qword [rsp + 0x50], 0
and qword [rsp + 0x58], 0
and qword [rsp + 0x60], 0
mov rdi, rcx
mov rcx, qword [rcx]
lea rax, [rsp + 0x60]
mov r9d, 0x2001f
xor r8d, r8d
mov rsi, rdx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov rcx, qword [rsp + 0x48]
mov ebx, eax
test eax, eax
jne 0x100002e5c
test rcx, rcx
je 0x100002dd2
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, eax
mov rcx, qword [rsp + 0x60]
test ebx, ebx
mov qword [rsp + 0x48], rcx
jmp 0x100002df8
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x48]
call fcn.100002d58
mov rcx, qword [rsp + 0x48]
mov ebx, eax
test eax, eax
jne 0x100002e5c
lea rax, [rsp + 0x68]
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x70]
mov qword [rsp + 0x38], rax
and qword [rsp + 0x30], 0
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
xor edx, edx
mov dword [rsp + 0x40], 0x100
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x100002de0
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x100002e4a
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
and qword [rsp + 0x48], 0
mov rdx, rsi
mov rcx, rdi
call fcn.100002ca8
mov rcx, qword [rsp + 0x48]
mov ebx, eax
test rcx, rcx
je 0x100002e67
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.1000084f0
lea r11, [rsp + 0x280]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
Function at 0x100003368
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
sub rsp, 0x460
mov rax, qword [0x10000b108]
xor rax, rsp
mov qword [rsp + 0x450], rax
xor ebp, ebp
mov rax, rdx
mov rbx, r8
mov qword [rsp + 0x38], rcx
lea r8d, [rbp + 2]
xor edx, edx
mov rcx, rax
mov rsi, r9
mov qword [rsp + 0x30], rbp
mov qword [rsp + 0x40], rbp
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rdi, rax
cmp rax, rbp
jne 0x1000033c6
call fcn.1000028f0
mov ebx, eax
jmp 0x1000034d3
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
cmp rax, rbp
jne 0x1000033e7
call fcn.1000028f0
jmp 0x1000034c8
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rsi, rax
cmp rax, rbp
je 0x1000033dd
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
inc eax
cmp eax, ebx
jae 0x10000342f
lea rax, [rsp + 0x48]
cmp qword [rsp + 0x40], rax
je 0x100003425
lea rcx, [rsp + 0x40]
call fcn.100005fd0
mov eax, 0x8007000e
jmp 0x1000034eb
mov ecx, eax
cmp rcx, rbp
je 0x10000346e
xor edx, edx
or rax, 0xffffffffffffffff
div rcx
cmp rax, 2
jb 0x100003463
lea rdx, [rcx + rcx]
cmp rdx, 0x400
jbe 0x10000346e
lea rcx, [rsp + 0x40]
call fcn.10000640c
mov r11, qword [rsp + 0x40]
jmp 0x100003478
mov ecx, 0x80070057
call fcn.100002898
int3
lea r11, [rsp + 0x48]
mov qword [rsp + 0x40], r11
cmp r11, rbp
jne 0x100003484
mov ebx, 0x8007000e
jmp 0x1000034ca
xor edx, edx
mov r9d, ebx
mov r8, rsi
lea ecx, [rdx + 3]
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], r11
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebp
je 0x1000033dd
mov r8d, dword [rsp + 0x4a0]
mov ecx, eax
mov rax, qword [rsp + 0x40]
mov word [rax + rcx*2], bp
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x30]
call fcn.100003f3c
mov ebx, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rax, [rsp + 0x48]
cmp qword [rsp + 0x40], rax
je 0x1000034e9
lea rcx, [rsp + 0x40]
call fcn.100005fd0
mov eax, ebx
mov rcx, qword [rsp + 0x450]
xor rcx, rsp
call fcn.1000084f0
mov rbx, qword [rsp + 0x480]
add rsp, 0x460
pop rdi
pop rsi
pop rbp
ret
Function at 0x100005e8c
Capabilities:
Accept command line arguments

Disassembly:
push rbx
sub rsp, 0x30
mov ebx, r9d
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
mov dword [rsp + 0x28], 2
call qword [sym.imp.KERNEL32.dll_HeapSetInformation]
test eax, eax
jne 0x100005ed4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x100002260]
lea rcx, [rsp + 0x20]
mov r8d, eax
mov ebx, eax
call fcn.100005a3c
jmp 0x100005f55
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea r8, [rsp + 0x28]
mov r9d, 4
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapSetInformation]
test eax, eax
jne 0x100005f0e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x100002310]
lea rcx, [rsp + 0x20]
mov r8d, eax
call fcn.100005a3c
cmp byte [0x10000b920], 0
je 0x100005f1c
or ebx, 0xffffffff
jmp 0x100005f55
and dword [rsp + 0x24], 0
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea r8, [rsp + 0x24]
lea rcx, [0x10000b9b0]
mov rdx, rax
call fcn.100005fe0
cmp al, 1
jne 0x100005f51
lea rcx, [0x10000b9b0]
mov edx, ebx
call fcn.100006240
mov ebx, eax
jmp 0x100005f55
mov ebx, dword [rsp + 0x24]
mov eax, ebx
add rsp, 0x30
pop rbx
ret
Function at 0x100006240
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rsi
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x60
mov rdi, qword [0x10000b2d0]
mov ebx, 1
jmp 0x1000062e0
test ebx, ebx
js 0x1000062ef
mov rsi, qword [rdi]
test rsi, rsi
je 0x1000062dc
mov rax, qword [rsi + 0x10]
and qword [rsp + 0x80], 0
test rax, rax
jne 0x100006288
xor ebx, ebx
jmp 0x1000062dc
mov rcx, qword [rsi + 0x18]
lea r8, [rsp + 0x80]
lea rdx, [0x100002450]
call rax
mov ebx, eax
test eax, eax
js 0x1000062c9
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsi]
mov r9d, 1
lea rax, [rsi + 0x28]
lea r8d, [r9 + 3]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ole32.dll_CoRegisterClassObject]
mov ebx, eax
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x1000062dc
mov rax, qword [rcx]
call qword [rax + 0x10]
add rdi, 8
cmp rdi, qword [0x10000b2d8]
jb 0x100006262
test ebx, ebx
jne 0x100006356
cmp byte [0x10000ba10], 0
je 0x10000635d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x10000ba00], rax
test rax, rax
je 0x10000634f
lea rax, [rsp + 0x70]
lea r9, [0x10000b9b0]
lea r8, [0x100006440]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], 0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
test rax, rax
jne 0x10000635d
mov rcx, qword [0x10000ba00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 0x80004005
jmp 0x10000635d
mov byte [0x10000ba10], 0
test ebx, ebx
jne 0x1000063a7
lea rcx, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jle 0x1000063a9
lea rcx, [rsp + 0x30]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x30]
call qword [sym.imp.USER32.dll_DispatchMessageW]
lea rcx, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jg 0x100006378
test ebx, ebx
js 0x1000063f1
mov rdi, qword [0x10000b2d0]
xor ebx, ebx
jmp 0x1000063d3
test ebx, ebx
jne 0x1000063dc
mov rax, qword [rdi]
test rax, rax
je 0x1000063cf
mov ecx, dword [rax + 0x28]
test ecx, ecx
je 0x1000063cf
call qword [sym.imp.ole32.dll_CoRevokeClassObject]
mov ebx, eax
add rdi, 8
cmp rdi, qword [0x10000b2d8]
jb 0x1000063b4
cmp byte [0x10000ba10], 0
je 0x1000063f1
mov ecx, dword [0x10000ba0c]
call qword [sym.imp.KERNEL32.dll_Sleep]
lea r11, [rsp + 0x60]
mov eax, ebx
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
Function at 0x100008048
Capabilities:
Check os version

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0xd0
mov rax, qword [0x10000b108]
xor rax, rsp
mov qword [rsp + 0xc0], rax
xor edx, edx
mov rbx, rcx
lea r8d, [rdx + 0x28]
add rcx, r8
call sub.msvcrt.dll_memset
and qword [rbx + 0x50], 0
and dword [rbx + 0x58], 0
and dword [rbx + 0x5c], 0
lea rax, [0x100000000]
mov esi, 0x94
lea rcx, [rsp + 0x20]
mov r8, rsi
xor edx, edx
mov qword [rbx + 0x10], rax
mov qword [rbx + 8], rax
mov dword [rbx], 0x60
mov byte [rbx + 0x18], 0
call sub.msvcrt.dll_memset
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x20], esi
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [rsp + 0x30], 2
mov esi, 1
jne 0x1000080db
cmp dword [rsp + 0x24], 5
jb 0x1000080f5
jmp 0x1000080f1
cmp dword [rsp + 0x30], esi
jne 0x1000080f5
cmp dword [rsp + 0x24], 4
ja 0x1000080f1
jne 0x1000080f5
cmp dword [rsp + 0x28], 0
jbe 0x1000080f5
mov byte [rbx + 0x18], sil
lea rax, [0x100001570]
lea rcx, [rbx + 0x28]
mov dword [rbx + 0x1c], 0x800
mov qword [rbx + 0x20], rax
call fcn.1000028c8
movzx ecx, byte [0x10000b920]
test eax, eax
mov rax, rbx
cmovs ecx, esi
mov byte [0x10000b920], cl
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.1000084f0
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret

Function at 0x1000084f0
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x10000b108]
jne 0x10000850b
rol rcx, 0x10
test cx, 0xffff
jne 0x100008507
ret 0
ror rcx, 0x10
jmp 0x100008ab0
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x10000b450]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov r11, qword [0x10000b548]
mov qword [rsp + 0x58], r11
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x100008b35
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x10000b450]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x100008b57
mov rax, qword [rsp + 0x88]
mov qword [0x10000b548], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x10000b4e8], rax
mov rax, qword [0x10000b548]
mov qword [0x10000b3c0], rax
mov rax, qword [rsp + 0x90]
mov qword [0x10000b4d0], rax
mov dword [0x10000b3b0], 0xc0000409
mov dword [0x10000b3b4], 1
mov rax, qword [0x10000b108]
mov qword [rsp + 0x68], rax
mov rax, qword [0x10000b110]
mov qword [rsp + 0x70], rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x1000015f8]
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, 0x88
ret
Function at 0x10000894c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
cmp rcx, rdx
je 0x100008999
cmp rcx, 0xffffffffffffffff
je 0x100008999
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x100008991
cmp dword [rcx + 0x3c], edx
jl 0x100008991
cmp dword [rcx + 0x3c], 0x10000000
jae 0x100008991
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp], rax
cmp dword [rax], 0x4550
cmovne rax, rdx
mov rdx, rax
mov qword [rsp], rax
jmp 0x100008999
mov rax, rdx
add rsp, 0x18
ret

Function at 0x100008c08
Capabilities:
Print debug messages

Disassembly:
push rbx
sub rsp, 0x530
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rbx, qword [rsp + 0x158]
lea rdx, [rsp + 0x40]
mov rcx, rbx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_RtlLookupFunctionEntry]
test rax, rax
je 0x100008c73
and qword [rsp + 0x38], 0
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x48]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x50]
mov r9, rax
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x60]
mov r8, rbx
mov qword [rsp + 0x20], rcx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_RtlVirtualUnwind]
jmp 0x100008c93
mov rax, qword [rsp + 0x538]
mov qword [rsp + 0x158], rax
lea rax, [rsp + 0x538]
mov qword [rsp + 0xf8], rax
lea rcx, [0x100001608]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add rsp, 0x530
pop rbx
ret
Function at 0x401d2d
Capabilities:
Initialize winsock library

Disassembly:
push rbp
sub rsp, 0x1c0
lea rbp, [rsp + 0x80]
lea rax, [rbp - 0x60]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
nop
add rsp, 0x1c0
pop rbp
ret
Function at 0x402483
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov dword [rbp + 0x20], r8d
mov qword [rbp + 0x28], r9
cmp qword [rbp + 0x28], 0
je 0x4024b6
mov rax, qword [rbp + 0x28]
mov eax, dword [rax]
test eax, eax
jne 0x4024b6
mov rax, qword [rbp + 0x28]
mov dword [rax], 0x800
cmp qword [rbp + 0x28], 0
je 0x4024c5
mov rax, qword [rbp + 0x28]
mov eax, dword [rax]
jmp 0x4024ca
mov eax, 0x800
mov dword [rbp - 4], eax
mov rax, qword [rbp + 0x30]
mov dword [rax], 0
lea rcx, [rbp - 0x1c]
mov edx, dword [rbp - 4]
mov rax, qword [rbp + 0x18]
mov r8, rcx
mov rcx, rax
call fcn.00401649
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x402502
mov eax, 0xfffffff4
jmp 0x4025c1
mov eax, dword [rbp - 0x1c]
sub eax, dword [rbp + 0x20]
mov ecx, eax
mov edx, dword [rbp + 0x20]
mov rax, qword [rbp - 0x10]
add rdx, rax
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
cdqe
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
jle 0x402591
mov rax, qword [rbp - 0x18]
mov edx, eax
mov eax, dword [rbp + 0x20]
add edx, eax
mov rax, qword [rbp + 0x18]
mov rcx, rax
call fcn.00401703
mov rax, qword [rbp - 0x18]
mov edx, eax
mov rax, qword [rbp + 0x30]
mov dword [rax], edx
mov eax, dword [rbp - 0x1c]
sub eax, dword [rbp + 0x20]
mov eax, eax
cmp qword [rbp - 0x18], rax
jne 0x40258a
shl dword [rbp - 4], 1
cmp dword [rbp - 4], 0x4000
jbe 0x402581
mov dword [rbp - 4], 0x4000
mov rax, qword [rbp + 0x28]
mov edx, dword [rbp - 4]
mov dword [rax], edx
mov eax, 0
jmp 0x4025c1
cmp qword [rbp - 0x18], 0
jne 0x40259f
mov eax, 0xfffffc18
jmp 0x4025c1
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
cmp eax, 0x2733
jne 0x4025b6
mov eax, 1
jmp 0x4025c1
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
neg eax
add rsp, 0x40
pop rbp
ret
Function at 0x4025c7
Capabilities:
Send data
Send data on socket

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x80]
mov qword [rbp - 0x30], rcx
mov qword [rbp - 0x28], rdx
mov qword [rbp - 0x20], r8
mov dword [rbp - 0x18], r9d
mov rax, qword [rbp - 0x10]
mov dword [rax], 0
mov rax, qword [rbp - 0x28]
mov rcx, rax
call fcn.00401cb0
mov dword [rbp - 0x54], eax
cmp dword [rbp - 0x18], 0
je 0x40270c
cmp dword [rbp - 0x54], 0
jne 0x4026dd
mov ecx, dword [rbp - 0x18]
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov rdx, qword [rbp - 0x20]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
cdqe
mov qword [rbp - 0x60], rax
cmp qword [rbp - 0x60], 0
jns 0x40266c
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
cmp eax, 0x2733
je 0x402662
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
neg eax
jmp 0x4027e7
mov eax, 1
jmp 0x4027e7
cmp qword [rbp - 0x60], 0
jne 0x40267d
mov eax, 0xfffffc18
jmp 0x4027e7
mov rax, qword [rbp - 0x60]
add qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x60]
sub dword [rbp - 0x18], eax
mov rax, qword [rbp - 0x60]
mov edx, eax
mov rax, qword [rbp - 0x10]
mov dword [rax], edx
cmp dword [rbp - 0x18], 0
jne 0x4026dd
mov rax, qword [rbp - 0x30]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov r8d, 0x21
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAEventSelect]
call rax
test eax, eax
je 0x4026d3
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
neg eax
jmp 0x4027e7
mov eax, 0
jmp 0x4027e7
mov ecx, dword [rbp - 0x18]
mov rdx, qword [rbp - 0x20]
mov rax, qword [rbp - 0x28]
mov r8d, ecx
mov rcx, rax
call fcn.00401722
test rax, rax
jne 0x402702
mov eax, 0xfffffff4
jmp 0x4027e7
mov eax, 1
jmp 0x4027e7
cmp dword [rbp - 0x54], 0
jne 0x40271c
mov eax, 0
jmp 0x4027e7
mov ebx, dword [rbp - 0x54]
mov rax, qword [rbp - 0x28]
mov rcx, rax
call fcn.00401cc0
mov rdx, rax
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov r9d, 0
mov r8d, ebx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
cdqe
mov qword [rbp - 0x60], rax
cmp qword [rbp - 0x60], 0
jns 0x40277b
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
cmp eax, 0x2733
je 0x402774
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
neg eax
jmp 0x4027e7
mov eax, 1
jmp 0x4027e7
cmp qword [rbp - 0x60], 0
jne 0x402789
mov eax, 0xfffffc18
jmp 0x4027e7
mov rax, qword [rbp - 0x60]
mov edx, eax
mov rax, qword [rbp - 0x28]
mov rcx, rax
call fcn.004015f4
mov rax, qword [rbp - 0x60]
mov edx, eax
mov rax, qword [rbp - 0x10]
mov dword [rax], edx
mov rax, qword [rbp - 0x60]
cmp dword [rbp - 0x54], eax
jne 0x4027e2
mov rax, qword [rbp - 0x30]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov r8d, 0x21
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAEventSelect]
call rax
test eax, eax
je 0x4027e2
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
neg eax
jmp 0x4027e7
mov eax, 0
add rsp, 0x38
pop rbx
pop rbp
ret
Function at 0x40301a
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rbx
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov rax, qword [rbp + 0x20]
mov qword [rbp - 8], rax
mov rax, qword [rbp + 0x20]
mov eax, dword [rax + 0x14]
test eax, eax
je 0x4030cd
mov rax, qword [rbp + 0x20]
mov dword [rax + 0x14], 0
mov dword [rbp - 0xc], 0
mov rax, qword [rbp + 0x20]
lea rdx, [rax + 0x18]
lea rcx, [rbp - 0xc]
mov rax, qword [rbp + 0x28]
mov r9d, 0
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
call rax
test eax, eax
jne 0x4030a7
mov rax, qword [rbp + 0x20]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ResetEvent]
call rax
lea rcx, str.GetOverlappedResult
call fcn.00402b93
jmp 0x403228
mov edx, dword [rbp - 0xc]
mov rax, qword [rbp - 8]
mov rcx, rax
call fcn.004015f4
mov edx, dword [rbp - 0xc]
mov rax, qword [rbp + 0x30]
mov r8d, edx
mov edx, 0x77
mov rcx, rax
call fcn.00401a92
mov rax, qword [rbp - 8]
mov rcx, rax
call fcn.00402bc0
mov dword [rbp - 0xc], eax
mov eax, dword [rbp - 0xc]
test eax, eax
jne 0x403101
mov rax, qword [rbp + 0x20]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ResetEvent]
call rax
mov eax, 0
jmp 0x403228
mov dword [rbp - 0x10], 0
mov rax, qword [rbp + 0x20]
lea rbx, [rax + 0x18]
mov esi, dword [rbp - 0xc]
mov rax, qword [rbp - 8]
mov rcx, rax
call fcn.00402bd0
mov rdx, rax
lea rcx, [rbp - 0x10]
mov rax, qword [rbp + 0x28]
mov qword [rsp + 0x20], rbx
mov r9, rcx
mov r8d, esi
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
test eax, eax
je 0x40319c
mov eax, dword [rbp - 0x10]
test eax, eax
jne 0x403171
mov rax, qword [rbp + 0x20]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ResetEvent]
call rax
lea rcx, str.fd_closed
call fcn.00401a4b
jmp 0x403228
mov edx, dword [rbp - 0x10]
mov rax, qword [rbp - 8]
mov rcx, rax
call fcn.004015f4
mov edx, dword [rbp - 0x10]
mov rax, qword [rbp + 0x30]
mov r8d, edx
mov edx, 0x77
mov rcx, rax
call fcn.00401a92
jmp 0x403223
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
cmp eax, 0x3e5
je 0x4031bf
cmp eax, 0x3e5
ja 0x403201
cmp eax, 1
je 0x4031df
cmp eax, 0x6d
je 0x4031cc
jmp 0x403201
mov rax, qword [rbp + 0x20]
mov dword [rax + 0x14], 1
jmp 0x403223
lea rdx, str.child_process_has_closed_pipe
mov ecx, 0
call fcn.004019b6
jmp 0x403223
mov rax, qword [rbp + 0x20]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ResetEvent]
call rax
lea rcx, str.not_running_within_a_TS_session
call fcn.00401a4b
jmp 0x403228
mov rax, qword [rbp + 0x20]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ResetEvent]
call rax
lea rcx, str.failed_to_write
call fcn.00402b93
jmp 0x403228
mov eax, 0
add rsp, 0x40
pop rbx
pop rsi
pop rbp
ret