joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18008e5b8
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 0x18008e5e8
xor eax, eax
jmp 0x18008e6ab
mov rbp, rbx
cmp word [rax], si
je 0x18008e60d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x18008e5f4
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18008e5f0
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.18008cca0
movsxd r14, eax
test eax, eax
jne 0x18008e64b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18008e5e1
mov rcx, r14
call fcn.180087498
mov rdi, rax
test rax, rax
jne 0x18008e664
xor ecx, ecx
call fcn.180087014
jmp 0x18008e640
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.18008cca0
test eax, eax
jne 0x18008e695
mov rcx, rdi
call fcn.180087014
jmp 0x18008e69f
xor ecx, ecx
call fcn.180087014
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 0x180091420
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.180084360
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x1800914c1
cmp ebx, dword [rsp + 0x30]
je 0x1800914ba
test esi, esi
je 0x1800914ba
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x180091495
sub r8w, 0x61
cmp r8w, 0x19
ja 0x1800914a2
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x18009147f
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x1800914a6
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x1800914c3
mov eax, 1
jmp 0x1800914c3
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x180095e58
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.18008b11c
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.18008b11c
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x180095fa8
cmp rax, 0xffffffffffffffff
je 0x180095fa8
xor edi, edi
test rbp, rbp
jle 0x180095f53
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1800861b4
mov rbx, rax
test rax, rax
jne 0x180095ee0
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x180095f49
mov edx, 0x8000
mov ecx, r14d
call fcn.180095cdc
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.180086d0c
cmp eax, 0xffffffff
je 0x180095f29
cdqe
sub rbp, rax
test rbp, rbp
jg 0x180095ef0
mov edx, r15d
mov ecx, r14d
call fcn.180095cdc
jmp 0x180095f49
cmp byte [rsi + 0x38], dil
je 0x180095f40
cmp dword [rsi + 0x34], 5
jne 0x180095f40
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x180095f49
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.180087014
jmp 0x180095fbc
jns 0x180095fbc
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.18008b11c
cmp rax, 0xffffffffffffffff
jne 0x180095f74
cmp byte [rsi + 0x30], dil
je 0x180095fbc
mov edi, dword [rsi + 0x2c]
jmp 0x180095fbc
mov ecx, r14d
call fcn.18008ed74
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x180095fbc
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 0x180095fbc
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x180095fb5
mov eax, dword [rsi + 0x2c]
jmp 0x180095fba
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.18008b11c
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 0x1800967e0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x180096808
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x180096808
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400097f0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140009800]
mov dword [rax], 1
mov rax, qword [0x140009810]
mov dword [rax], 1
mov rax, qword [0x1400097a0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400097e0]
mov dword [0x14000d00c], 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 [0x1400098c0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x1400098a0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140009750]
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 0x140001594
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
call dbg.__main
mov qword [rbp - 8], 0x228
mov rax, qword [rbp - 8]
mov r9d, 0x40
mov r8d, 0x3000
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x1400015f2
lea rax, str.Erreur_lors_de_lallocation_de_mmoire._n
mov rcx, rax
call sym.printf
mov eax, 0xffffffff
jmp 0x140001649
lea rax, [0x14000907a]
mov rcx, rax
call sym.printf
mov rdx, qword [rbp - 8]
mov rax, qword [rbp - 0x10]
mov r8, rdx
lea rdx, [0x140008020]
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp - 0x10]
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
call rax
mov rax, qword [rbp - 0x10]
mov r8d, 0x8000
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFree]
call rax
mov eax, 0
add rsp, 0x40
pop rbp
ret

Function at 0x140001910
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 0x1400022e0
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 0x14000232d
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 0x140002324
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000232f
add rax, 0x28
cmp rax, r9
jne 0x140002310
xor eax, eax
ret

Function at 0x140002330
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x1400023c0
mov rdx, qword [0x1400097a0]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x1400023ae
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x1400023ae
cmp word [rax + 0x18], 0x20b
jne 0x1400023ae
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x1400023c0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140002399
add rbx, 0x28
cmp rbx, rdi
je 0x1400023c0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140002390
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 0x1400023d0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400097a0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400023f0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400023f8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400023f0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000244d
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 0x140002444
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400023f0
add rax, 0x28
cmp rax, r9
jne 0x140002430
xor eax, eax
ret

Function at 0x140002450
Capabilities:
Parse pe header

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

Function at 0x140002490
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x1400097a0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400024b0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400024b8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400024b0
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140002500
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400024f7
test rcx, rcx
je 0x1400024b0
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x1400024e8
xor eax, eax
ret
Function at 0x140002510
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400097a0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000252f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002538
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

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

Disassembly:
mov rdx, qword [0x1400097a0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002570
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002578
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002570
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140002570
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x1400025c4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x1400025d0
add rdx, 0x28
cmp r9, rdx
jne 0x1400025b0
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x1400097a0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140002602
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140002610
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002602
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140002602
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140002602
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x140002665
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140002678
add rdx, 0x28
cmp rdx, r10
jne 0x140002650
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140002687
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140002697
mov edx, dword [rax + 0xc]
test edx, edx
je 0x14000266e
test ecx, ecx
jg 0x140002680
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140002300
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je 0x140002328
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x14000234e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140002350
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x1400023a9
test ecx, ecx
jle 0x140002389
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x1400023a9
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x1400023a9
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret

Function at 0x1400023d0
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 0x1400023f2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140002408
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 0x140002424
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140002426
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140002462
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 0x1400024fe
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14000249d
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 0x1400024de
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 0x1400024fe
cmp rbx, rax
ja 0x1400024b0
test rbx, rbx
je 0x1400024fe
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
Function at 0x140002960
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000298d
xor eax, eax
jmp 0x140002af9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x1400029c7
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x1400029c7
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 0x140002af9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140002aec
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140002a0a
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 0x140002a35
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 0x140002af1
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 0x140002aa4
sub eax, 1
je 0x140002aa4
cmp eax, 2
jne 0x140002aec
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 0x140002af1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140002ad2
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 0x140002aec
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140002af1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400038d0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140002f10
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140002fe3
cmp byte [rcx + 0x71], 0
je 0x140002fe3
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140002fdf
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 0x140002fa4
sub eax, 1
je 0x140002fa8
cmp eax, 2
jne 0x140002fdf
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400038d0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140002fd6
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 0x140002fdf
cmp byte [rbx + 0x71], 0
sete al
jmp 0x140002f8c
xor al, al
jmp 0x140002f8c
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400038d0
add rsp, 0x60
pop rbx
ret

Function at 0x140004410
Capabilities:
Parse pe header

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

Disassembly:
push rbx
push rsi
push rdi
push r15
sub rsp, 0x28
mov qword [rsp + 0x60], r13
xor r15d, r15d
mov qword [rsp + 0x20], r14
mov r13d, r9d
mov edi, r8d
mov r14, rdx
mov rbx, rcx
cmp qword [rcx + 8], r15
jne 0x1800010ae
mov eax, r15d
jmp 0x1800010b4
mov eax, dword [rcx + 0x10]
sub eax, dword [rcx + 8]
lea ecx, [rax + rdi]
mov qword [rsp + 0x50], rbp
cmp ecx, dword [rbx + 0x18]
jb 0x18000114d
pxor xmm0, xmm0
mov eax, ecx
mov qword [rsp + 0x58], r12
cvtsi2sd xmm0, rax
mulsd xmm0, qword [0x180018a00]
call fcn.18000f7d8
xor ecx, ecx
mov r8d, 0x1000
lea r9d, [rcx + 4]
cvttsd2si rbp, xmm0
shl ebp, 0xa
mov edx, ebp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdx, qword [rbx + 8]
mov rsi, rax
test rdx, rdx
jne 0x18000110f
mov ecx, r15d
jmp 0x180001114
mov ecx, dword [rbx + 0x10]
sub ecx, edx
mov r12d, ecx
mov r8d, ecx
mov rcx, rax
call fcn.180007720
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x180001139
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
lea rax, [r12 + rsi]
mov r12, qword [rsp + 0x58]
mov qword [rbx + 8], rsi
mov qword [rbx + 0x10], rax
mov dword [rbx + 0x18], ebp
mov rcx, qword [rbx + 0x10]
mov r8, rdi
mov rdx, r14
call fcn.180007720
mov r14, qword [rsp + 0x20]
test r13d, r13d
mov r13, qword [rsp + 0x60]
je 0x1800011d0
mov r10d, r15d
mov r9, r15
mov r11, r15
test edi, edi
jle 0x1800011d0
mov rbp, qword [rsp + 0x70]
nop dword [rax]
movzx ecx, byte [r9 + rbp]
mov r8, qword [rbx + 0x10]
inc r9
mov eax, 0x8fb823ef
imul ecx
add edx, ecx
sar edx, 8
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0xcccccccd
imul edx, edx, 0x1c8
sub ecx, edx
mul r10d
add cl, 0x36
xor byte [r11 + r8], cl
shr edx, 3
lea ecx, [rdx + rdx*4]
add ecx, ecx
cmp r10d, ecx
cmove r9, r15
inc r10d
inc r11
cmp r10d, edi
jl 0x180001180
add qword [rbx + 0x10], rdi
mov rbp, qword [rsp + 0x50]
mov eax, edi
add rsp, 0x28
pop r15
pop rdi
pop rsi
pop rbx
ret
Function at 0x180003250
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x1d0
mov rax, qword [0x18001c1d0]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
xor edi, edi
lea rax, vtable.CTcpSocket.0
mov rbx, rcx
mov qword [rcx + 0x10], rdi
mov dword [rcx + 0x18], edi
mov qword [rcx], rax
mov dword [rcx + 0x58], edi
mov qword [rcx + 0x48], rdi
mov qword [rcx + 0x50], rdi
lea rax, vtable.CBuffer.0
lea rdx, [rsp + 0x20]
mov qword [rcx + 0x40], rax
mov qword [rcx + 0x60], rax
mov dword [rcx + 0x78], edi
mov qword [rcx + 0x68], rdi
mov qword [rcx + 0x70], rdi
mov qword [rcx + 0x80], rax
mov dword [rcx + 0x98], edi
mov qword [rcx + 0x88], rdi
mov qword [rcx + 0x90], rdi
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea edx, [rdi + 1]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, edi
mov qword [rbx + 8], rax
xchg dword [rbx + 0x20], ecx
mov qword [rbx + 0xb0], 0xffffffffffffffff
mov qword [rbx + 0xa0], rdi
mov qword [rbx + 0xa8], rdi
mov dword [rbx + 0x1c], edi
mov rax, rbx
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.1800076f0
mov rbx, qword [rsp + 0x1e8]
add rsp, 0x1d0
pop rdi
ret

Function at 0x180003330
Capabilities:
Set socket configuration

Disassembly:
push rdi
sub rsp, 0x30
cmp dword [rcx + 0x20], 0
mov rdi, rcx
je 0x1800033aa
mov rcx, qword [rcx + 0xb0]
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov r8d, 0x80
mov qword [rsp + 0x48], rbx
mov dword [rsp + 0x40], 1
xor ebx, ebx
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rdi + 0xb0]
call qword [sym.imp.KERNEL32.dll_CancelIo]
xchg dword [rdi + 0x20], ebx
mov rcx, qword [rdi + 0xb0]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rbx, qword [rsp + 0x48]
mov qword [rdi + 0xb0], 0xffffffffffffffff
add rsp, 0x30
pop rdi
ret