joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140003740
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x140003762
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je case.default.0x140003771
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140003794
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140003796
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1400037d2
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x14000386e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14000380d
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x14000384e
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x14000386e
cmp rbx, rax
ja 0x140003820
test rbx, rbx
je 0x14000386e
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
or qword [r14 - 0x78], 0xffffffffc283ab52
int1
mov dword [rcx + 0x18], 0x9851a3c
cmp al, 0x1a
test dword [rcx], ecx
mov dword [rbp + 5], esi
mov dh, 0x80
pop rdx
xor byte ss:[rdi - 0x35], ch
imul esp, dword [0x166b82222], 0x675068aa
stosb byte [rdi], al
invalid
push rax
invalid
stosb byte [rdi], al
push 0x1f156750
ja 0x14017f0bc
jo 0x14017f068
push rsp
jo 0x14017f05c
rcr byte [rdi - 0x15], cl
push 0xffffffffffffffc9
test byte [rsp + rax*8 - 0x339c4432], bh
xchg ebx, ecx
Function at 0x140003c90
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x1400dd4e0]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140003cbd
xor eax, eax
jmp 0x140003e29
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140003cf7
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140003cf7
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x140003e29
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140003e1c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140003d3a
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140003d65
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140003e21
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140003dd4
sub eax, 1
je 0x140003dd4
cmp eax, 2
jne 0x140003e1c
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140003e21
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140003e02
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x140003e1c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140003e21
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400ae6f0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140004180
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x1400dd4e0]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140004253
cmp byte [rcx + 0x71], 0
je 0x140004253
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + Ordinal_26]
cmp eax, 0xffffffff
je 0x14000424f
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140004214
sub eax, 1
je 0x140004218
cmp eax, 2
jne 0x14000424f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400ae6f0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140004246
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x14000424f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x1400041fc
xor al, al
jmp 0x1400041fc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400ae6f0
add rsp, 0x60
pop rbx
ret
Function at 0x14001c940
Capabilities:
Hash data using djb2

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x40
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], 0x1505
mov rax, qword [rsp + 0x20]
cmp qword [rsp + 0x50], rax
jae 0x14001c9cb
mov rax, qword [rsp + 0x28]
shl rax, 5
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x50]
movzx eax, byte [rax]
mov byte [rsp + 0x30], al
mov rax, qword [rsp + 0x50]
inc rax
mov qword [rsp + 0x50], rax
movzx ecx, byte [rsp + 0x30]
call fcn.14003f1b0
movsx rax, al
mov rcx, qword [rsp + 0x28]
xor rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
jmp 0x14001c96d
xor edx, edx
mov rax, qword [rsp + 0x28]
mov ecx, 0x100
div rcx
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x140034a00
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x40
mov rax, qword [rsp + 0x50]
movzx eax, byte [rax + 0xaa8]
test eax, eax
je 0x140034b0a
mov rax, qword [rsp + 0x50]
cmp qword [rax + 0x260], 0
je 0x140034a95
mov rcx, qword [rsp + 0x50]
call fcn.1400146b0
mov byte [rsp + 0x30], al
mov dl, 1
mov rcx, qword [rsp + 0x50]
call fcn.140014640
mov rax, qword [rsp + 0x50]
mov rax, qword [rax + 0x1d8]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x68]
mov r8, qword [rsp + 0x60]
mov edx, dword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x50]
call qword [rax + 0x260]
movzx edx, byte [rsp + 0x30]
mov rcx, qword [rsp + 0x50]
call fcn.140014640
jmp 0x140034b0a
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x140034ab4
cmp dword [rsp + 0x34], 1
je 0x140034ab4
cmp dword [rsp + 0x34], 2
je 0x140034ab4
jmp 0x140034b0a
movsxd rax, dword [rsp + 0x58]
imul rax, rax, 3
lea rcx, [0x1400b5120]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x50]
mov r9, qword [rcx + 0x1d0]
mov r8d, 1
mov edx, 2
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rax, qword [rsp + 0x50]
mov r9, qword [rax + 0x1d0]
mov r8d, 1
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x60]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add rsp, 0x40
pop rdi
ret

Function at 0x140038560
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rdi
sub rsp, 0x20
mov rcx, qword [rsp + 0x40]
call fcn.1400383c0
mov r8d, eax
mov rdx, qword [rsp + 0x38]
mov ecx, dword [rsp + 0x30]
call sub.api_ms_win_crt_stdio_l1_1_0.dll__read
cdqe
add rsp, 0x20
pop rdi
ret
Function at 0x140038d00
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x60
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x28], 0
lea rcx, str.kernel32
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x140038d3d
xor eax, eax
jmp 0x140038ed9
lea rdx, str.LoadLibraryExA
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x28], rax
lea rdx, [0x1400d2bc4]
mov rcx, qword [rsp + 0x70]
call sub.api_ms_win_crt_string_l1_1_0.dll_strpbrk
test rax, rax
je 0x140038da9
cmp qword [rsp + 0x28], 0
je 0x140038d8a
mov r8d, 8
xor edx, edx
mov rcx, qword [rsp + 0x70]
call qword [rsp + Ordinal_41]
mov qword [rsp + 0x50], rax
jmp 0x140038d9a
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
jmp 0x140038ed4
cmp qword [rsp + 0x28], 0
je 0x140038de3
lea rdx, str.AddDllDirectory
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140038de3
mov r8d, 0x800
xor edx, edx
mov rcx, qword [rsp + 0x70]
call qword [rsp + Ordinal_41]
mov qword [rsp + 0x20], rax
jmp 0x140038ed4
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0
je 0x140038ed4
mov rcx, qword [rsp + 0x70]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov qword [rsp + 0x40], rax
mov eax, dword [rsp + 0x38]
inc eax
mov eax, eax
add rax, qword [rsp + 0x40]
mov rcx, rax
call qword [section..data]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x140038ec9
mov edx, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x140038ec9
mov rcx, qword [rsp + 0x48]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
lea rdx, [0x1400d2be8]
mov rcx, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
mov rcx, qword [rsp + 0x48]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov rdx, qword [rsp + 0x70]
mov rcx, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
cmp qword [rsp + 0x28], 0
je 0x140038eaf
mov r8d, 8
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [rsp + Ordinal_41]
mov qword [rsp + 0x58], rax
jmp 0x140038ebf
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov rcx, qword [rsp + 0x48]
call qword [fcn.1400b0292]
mov rax, qword [rsp + 0x20]
add rsp, 0x60
pop rdi
ret
Function at 0x1400565c0
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x70
lea rdi, [rsp + 0x30]
mov ecx, reloc.WS2_32.dll_recv
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x80]
cmp qword [rsp + 0x88], 0
je 0x14005660a
mov rax, qword [rsp + 0x88]
cmp dword [rax], 0
jne 0x14005664c
cmp qword [rsp + 0x90], 0
je 0x140056622
mov rax, qword [rsp + 0x90]
cmp dword [rax], 0
jne 0x14005664c
cmp qword [rsp + 0x98], 0
je 0x14005663a
mov rax, qword [rsp + 0x98]
cmp dword [rax], 0
jne 0x14005664c
mov rcx, qword [rsp + 0xa0]
call fcn.140056540
jmp 0x14005671d
mov rdx, qword [rsp + 0xa0]
lea rcx, [rsp + 0x38]
call fcn.1400a1b50
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x98], 0
je 0x14005668a
mov rax, qword [rsp + 0x98]
cmp dword [rax], 0
je 0x14005668a
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0x50], rax
jmp 0x140056693
mov qword [rsp + 0x50], 0
cmp qword [rsp + 0x90], 0
je 0x1400566ba
mov rax, qword [rsp + 0x90]
cmp dword [rax], 0
je 0x1400566ba
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x58], rax
jmp 0x1400566c3
mov qword [rsp + 0x58], 0
cmp qword [rsp + 0x88], 0
je 0x1400566ea
mov rax, qword [rsp + 0x88]
cmp dword [rax], 0
je 0x1400566ea
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x60], rax
jmp 0x1400566f3
mov qword [rsp + 0x60], 0
mov eax, dword [rsp + 0x80]
inc eax
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x20], rcx
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
mov ecx, eax
call qword [sym.imp.WS2_32.dll_select]
mov rdi, rax
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_accept
call fcn.1400aeeb0
mov rax, rdi
add rsp, 0x70
pop rdi
ret
Function at 0x140057f90
Capabilities:
Move file

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0xd8
lea rdi, [rsp + 0x20]
mov ecx, reloc.WLDAP32.dll_Ordinal_46
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0xf0]
mov rax, qword [0x1400dd4e0]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov dword [rsp + 0x20], 0x3e8
lea rcx, [rsp + 0x78]
call fcn.14001d9d0
lea rcx, [rsp + 0x38]
mov rdi, rcx
mov rsi, rax
mov ecx, reloc.WS2_32.dll_recv
rep movsb byte [rdi], byte [rsi]
mov rcx, qword [rsp + 0xf0]
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
mov qword [rsp + 0x58], rax
mov rcx, qword [rsp + 0xf8]
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
mov qword [rsp + 0x60], rax
mov r8d, 1
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x140058077
cmp qword [rsp + 0x58], 0
je 0x14005804b
mov rcx, qword [rsp + 0x58]
call fcn.1400b0292
mov qword [rsp + 0x58], 0
xor eax, eax
test eax, eax
jne 0x140058030
cmp qword [rsp + 0x60], 0
je 0x14005806c
mov rcx, qword [rsp + 0x60]
call fcn.1400b0292
mov qword [rsp + 0x60], 0
xor eax, eax
test eax, eax
jne 0x140058051
jmp 0x14005813a
lea rax, [rsp + 0xb0]
lea rcx, [rsp + 0x38]
mov rdi, rax
mov rsi, rcx
mov ecx, reloc.WS2_32.dll_recv
rep movsb byte [rdi], byte [rsi]
lea rcx, [rsp + 0x88]
call fcn.14001d9d0
lea rcx, [rsp + 0xa0]
mov rdi, rcx
mov rsi, rax
mov ecx, reloc.WS2_32.dll_recv
rep movsb byte [rdi], byte [rsi]
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0xa0]
call fcn.14001dae0
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
jl 0x1400580e1
movsxd rax, dword [rsp + 0x20]
cmp qword [rsp + 0x68], rax
jle 0x14005812a
cmp qword [rsp + 0x58], 0
je 0x1400580fc
mov rcx, qword [rsp + 0x58]
call fcn.1400b0292
mov qword [rsp + 0x58], 0
xor eax, eax
test eax, eax
jne 0x1400580e1
cmp qword [rsp + 0x60], 0
je 0x14005811d
mov rcx, qword [rsp + 0x60]
call fcn.1400b0292
mov qword [rsp + 0x60], 0
xor eax, eax
test eax, eax
jne 0x140058102
mov eax, 1
jmp 0x14005813c
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140058016
xor eax, eax
mov rdi, rax
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_accept
call fcn.1400aeeb0
mov rax, rdi
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.1400ae6f0
add rsp, 0xd8
pop rdi
pop rsi
ret
Function at 0x1400593e0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x40
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9, qword [rsp + 0x58]
mov r8, qword [rsp + 0x50]
xor edx, edx
xor ecx, ecx
call sub.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x14005943b
mov ecx, 0xffffffff
call fcn.1400594f0
cmp qword [rsp + 0x30], rax
jne 0x14005943f
xor eax, eax
jmp 0x140059444
mov rax, qword [rsp + 0x30]
add rsp, 0x40
pop rdi
ret

Function at 0x1400597f0
Capabilities:
Generate random numbers via winapi

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x20
mov r8, qword [rsp + 0x38]
xor edx, edx
mov rcx, qword [rsp + 0x30]
call sub.VCRUNTIME140.dll_memset
mov r9d, 2
mov r8d, dword [rsp + 0x38]
mov rdx, qword [rsp + 0x30]
xor ecx, ecx
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
je 0x140059832
mov eax, 2
jmp 0x140059834
xor eax, eax
add rsp, 0x20
pop rdi
ret
Function at 0x14005f500
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0xd0
lea rdi, [rsp + 0x30]
mov ecx, Ordinal_41
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0xe0]
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x74], 0
mov dword [rsp + 0x94], 4
mov eax, dword [rsp + 0xf8]
mov dword [rsp + 0xb4], eax
mov r8, qword [rsp + 0xf8]
xor edx, edx
mov rcx, qword [rsp + 0xf0]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x20], 0xf0000040
mov r9d, dword [rsp + 0x100]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x14005f5a8
jmp 0x14005f692
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rsp + 0x108]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x14005f5d3
jmp 0x14005f66a
xor r9d, r9d
mov r8d, dword [rsp + 0xe8]
mov rdx, qword [rsp + 0xe0]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x14005f5f7
jmp 0x14005f66a
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x94]
lea r8, [rsp + 0x74]
mov edx, 4
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
jne 0x14005f622
jmp 0x14005f66a
mov eax, dword [rsp + 0x74]
cmp qword [rsp + 0xf8], rax
jae 0x14005f632
jmp 0x14005f66a
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0xb4]
mov r8, qword [rsp + 0xf0]
mov edx, 2
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x14005f660
jmp 0x14005f66a
xor eax, eax
test eax, eax
jne 0x14005f5a8
cmp qword [rsp + 0x58], 0
je 0x14005f67d
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp qword [rsp + 0x38], 0
je 0x14005f692
xor edx, edx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_getpeername
call fcn.1400aeeb0
add rsp, 0xd0
pop rdi
ret
Function at 0x14005f750
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x40
mov qword [rsp + 0x20], 0
mov dword [rsp + 0x34], 1
mov dword [rsp + 0x38], 0x8000
mov eax, dword [rsp + 0x34]
mov edx, eax
mov rcx, qword [rsp + 0x20]
call qword [0x1400cf010]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x14005f7a0
mov rcx, qword [rsp + 0x20]
call qword [fcn.1400b0292]
xor eax, eax
jmp 0x14005f80b
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x20], rax
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x30], eax
mov r8d, dword [rsp + 0x30]
mov rdx, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x14005f7e6
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x34], eax
je 0x14005f7e6
mov eax, dword [rsp + 0x38]
cmp dword [rsp + 0x34], eax
jbe 0x14005f7f5
mov rcx, qword [rsp + 0x20]
call qword [fcn.1400b0292]
xor eax, eax
jmp 0x14005f80b
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x34], eax
jae 0x14005f806
mov rax, qword [rsp + 0x20]
jmp 0x14005f80b
jmp 0x14005f773
add rsp, 0x40
pop rdi
ret

Function at 0x140061440
Capabilities:
Send data
Send data on socket

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x50
lea rdi, [rsp + 0x20]
mov ecx, recv
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x40], rax
mov eax, 1
imul rax, rax, 0
mov byte [rsp + rax + 0x24], 0xff
mov eax, 1
imul rax, rax, 1
movzx ecx, byte [rsp + 0x68]
mov byte [rsp + rax + 0x24], cl
mov eax, 1
imul rax, rax, 2
movzx ecx, byte [rsp + 0x70]
mov byte [rsp + rax + 0x24], cl
mov eax, 8
imul rax, rax, 0
xor r9d, r9d
mov r8d, 3
lea rdx, [rsp + 0x24]
mov rcx, qword [rsp + 0x40]
mov rcx, qword [rcx + rax + 0x1a8]
call qword [sym.imp.WS2_32.dll_send]
cdqe
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jge 0x140061502
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x48], eax
mov r8d, dword [rsp + 0x48]
lea rdx, [0x1400d6838]
mov rcx, qword [rsp + 0x60]
call fcn.140034870
mov r9d, dword [rsp + 0x70]
mov r8d, dword [rsp + 0x68]
lea rdx, [0x1400d6854]
mov rcx, qword [rsp + 0x60]
call fcn.140061170
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_accept
call fcn.1400aeeb0
add rsp, 0x50
pop rdi
ret
Function at 0x140077250
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x120
lea rdi, [rsp + 0x20]
mov ecx, 0x40
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x130]
mov rax, qword [0x1400dd4e0]
xor rax, rsp
mov qword [rsp + 0x118], rax
mov rax, qword [rsp + 0x130]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x20], rax
mov eax, 8
imul rax, rax, 1
mov rcx, qword [rsp + 0x20]
mov rax, qword [rcx + rax + 0x1a8]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x38], 0xffffffffffffffff
mov dword [rsp + 0xf4], 0x80
lea r8, [rsp + 0xf4]
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x14007730c
mov dword [rsp + 0xf4], 0x80
lea r8, [rsp + 0xf4]
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0xffffffffffffffff
jne 0x140077332
lea rdx, str.Error_accept__ing_server_connect
mov rcx, qword [rsp + 0x130]
call fcn.140034870
mov eax, reloc.WLDAP32.dll_Ordinal_30
jmp 0x14007742a
lea rdx, str.Connection_accepted_from_server
mov rcx, qword [rsp + 0x130]
call fcn.140034730
mov rax, qword [rsp + 0x20]
mov byte [rax + 0x2d5], 0
mov edx, 1
mov rcx, qword [rsp + 0x38]
call fcn.1400a1c40
lea r9, [rsp + 0x38]
mov r8d, 1
mov rdx, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x130]
call fcn.14008d610
mov dword [rsp + 0x104], eax
cmp dword [rsp + 0x104], 0
je 0x14007739b
mov eax, dword [rsp + 0x104]
jmp 0x14007742a
mov rax, qword [rsp + 0x130]
cmp qword [rax + 0x270], 0
je 0x140077428
mov dword [rsp + 0x108], 0
mov dl, 1
mov rcx, qword [rsp + 0x130]
call fcn.140014640
mov r8d, 1
mov rdx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x130]
mov rcx, qword [rax + 0x278]
mov rax, qword [rsp + 0x130]
call qword [rax + 0x270]
mov dword [rsp + 0x108], eax
xor edx, edx
mov rcx, qword [rsp + 0x130]
call fcn.140014640
cmp dword [rsp + 0x108], 0
je 0x140077428
mov rdx, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x130]
call fcn.140077100
mov eax, Ordinal_46
jmp 0x14007742a
xor eax, eax
mov rdi, rax
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_closesocket
call fcn.1400aeeb0
mov rax, rdi
mov rcx, qword [rsp + 0x118]
xor rcx, rsp
call fcn.1400ae6f0
add rsp, 0x120
pop rdi
ret