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

Disassembly:
sub rsp, 0x38
cmp byte [rcx + 0xf1e], 0
movsxd r10, r9d
je 0x140050724
cmp r8d, 0xff
jne 0x140050661
lea eax, [r10 - 0xec]
cmp eax, 0x13
ja 0x14005064b
lea r8, [0x140000000]
mov r9, qword [r8 + r10*8 + 0x72440]
mov r8, rdx
lea rdx, str._s_IAC__s_n
add rsp, 0x38
jmp fcn.14002c130
mov r8, rdx
mov r9d, r10d
lea rdx, str._s_IAC__d_n
add rsp, 0x38
jmp fcn.14002c130
cmp r8d, 0xfb
jne 0x140050673
lea r9, str.WILL
jmp 0x1400506b1
cmp r8d, 0xfc
jne 0x140050685
lea r9, str.WONT
jmp 0x1400506b1
cmp r8d, 0xfd
jne 0x140050697
lea r9, [0x140072e64]
jmp 0x1400506b1
xor r9d, r9d
lea rax, str.DONT
cmp r8d, 0xfe
cmove r9, rax
test r9, r9
je 0x14005070d
cmp r10d, 0x27
jg 0x1400506e4
lea r8, [0x140000000]
mov r8, qword [r8 + r10*8 + 0x72a60]
test r8, r8
jne 0x1400506f4
mov r8, rdx
mov dword [rsp + 0x20], r10d
lea rdx, str._s__s__d_n
call fcn.14002c130
add rsp, 0x38
ret
cmp r10d, 0xff
jne 0x1400506cb
lea r8, str.EXOPL
mov qword [rsp + 0x20], r8
mov r8, rdx
lea rdx, str._s__s__s_n
call fcn.14002c130
add rsp, 0x38
ret
mov r9d, r8d
mov dword [rsp + 0x20], r10d
mov r8, rdx
lea rdx, str._s__d__d_n
call fcn.14002c130
add rsp, 0x38
ret

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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov rbp, qword [rcx]
mov edi, r8d
mov esi, edx
mov byte [rax + 0x10], 0xff
xor r9d, r9d
mov byte [rax + 0x11], sil
mov rbx, rcx
mov byte [rax + 0x12], dil
mov rcx, qword [rcx + 0x4c0]
lea rdx, [rax + 0x10]
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x140050acf
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.14002bfb0
mov rcx, qword [rbx]
lea rdx, str.SENT
mov r9d, edi
mov r8d, esi
call fcn.140050600
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x140050c80
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x140050e28
push rbp
push rdi
push r14
sub rsp, 0x20
mov rbp, qword [rcx]
mov r14, rcx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], r15
mov rdi, qword [rbp + 0x1e0]
lea rsi, [rdi + 0x1cb8]
lea rbx, [rdi + 0x1eb8]
mov qword [rbx], rsi
cmp rsi, rbx
jae 0x140050ce5
lea rax, [rsi + 1]
mov byte [rsi], 0xff
mov qword [rbx], rax
cmp rax, rbx
jae 0x140050ce5
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x140050ce5
mov byte [rax], dl
inc qword [rbx]
movzx ecx, word [rdi + 0x1ca8]
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rdi + 0x1caa]
movzx r15d, ax
mov word [rsp + 0x48], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r9, qword [rbx]
movzx ecx, ax
cmp r9, rbx
jae 0x140050d1c
mov byte [r9], r15b
inc qword [rbx]
mov r9, qword [rbx]
mov r15, qword [rsp + 0x58]
cmp r9, rbx
jae 0x140050d72
movzx eax, byte [rsp + 0x49]
mov byte [r9], al
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140050d72
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140050d72
shr cx, 8
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140050d72
mov byte [r9], 0xff
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140050d72
mov byte [r9], 0xf0
mov r9, qword [rbx]
inc r9
mov qword [rdi + 0x1ec0], r9
lea r8, [rdi + 0x1cba]
sub r9, rsi
mov qword [rbx], rsi
sub r9, 2
mov edx, 0x3e
mov rcx, rbp
call fcn.140050730
mov rcx, qword [r14 + 0x4c0]
xor r9d, r9d
mov rdx, rsi
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
test eax, eax
jns 0x140050dd4
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.14002bfb0
lea rdx, [rdi + 0x1cbb]
mov r8d, 4
mov rcx, r14
call fcn.140050b00
mov rcx, qword [r14 + 0x4c0]
lea rdx, [rdi + 0x1cbf]
xor r9d, r9d
lea r8d, [r9 + 2]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x140050e20
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.14002bfb0
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x140052590
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x140085080]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rbx, qword [rcx + 0xa00]
lea rax, [rsp + 0x30]
mov rdi, qword [rcx]
mov r14, rcx
mov dword [rsp + 0x30], 0x80
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov r8d, dword [rbx + 0x15c]
mov rdx, qword [rbx + 0x168]
add r8d, 4
mov rcx, qword [rbx + 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rbx + 0x150], 0
mov dword [rbx + 0x154], eax
jne 0x140052625
movsxd r8, dword [rsp + 0x30]
lea rcx, [rbx + 0xd0]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rbx + 0x150], eax
mov r8d, dword [rbx + 0x154]
mov qword [rsp + 0xf8], rbp
mov qword [rsp + 0x100], rsi
cmp r8d, 4
jge 0x140052686
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.14002bfb0
mov dword [rbx + 0xc], 7
xor eax, eax
mov rsi, qword [rsp + 0x100]
mov rbp, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.140066c60
add rsp, 0xd0
pop r14
pop rdi
pop rbx
ret
mov rdx, qword [rbx + 0x168]
movzx eax, byte [rdx]
movzx ecx, byte [rdx + 1]
shl eax, 8
or ecx, eax
mov dword [rbx + 0xc], ecx
sub ecx, 3
je 0x140052741
sub ecx, 1
je 0x1400527b4
sub ecx, 1
je 0x1400526f0
cmp ecx, 1
je 0x1400526d3
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rdi
lea rdx, [0x1400708c0]
call fcn.14002bfb0
jmp 0x1400527b4
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.1400522c0
test eax, eax
je 0x1400527b4
jmp 0x14005265a
movzx ecx, byte [rdx + 2]
lea eax, [r8 - 4]
movsxd rbp, eax
lea rsi, [rdx + 4]
movzx eax, byte [rdx + 3]
mov r8, rbp
shl ecx, 8
xor edx, edx
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x1400527b4
sub rax, rsi
cmp rax, rbp
jae 0x1400527b4
mov r8, rsi
lea rdx, str.TFTP_error:__s_n
mov rcx, rdi
call fcn.14002c130
jmp 0x1400527b4
cmp r8d, 4
jle 0x1400527b4
movzx eax, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
shl ecx, 8
or ecx, eax
movzx eax, word [rbx + 0x48]
inc eax
movzx eax, ax
cmp eax, ecx
jne 0x1400527b4
lea eax, [r8 - 4]
mov rcx, r14
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.14002bed0
mov esi, eax
test eax, eax
je 0x140052793
mov edx, 5
mov rcx, rbx
call fcn.140053280
mov eax, esi
jmp 0x14005265a
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.140039fa0
mov rcx, r14
call fcn.14003a280
test eax, eax
je 0x140052658
mov edx, 5
mov rcx, rbx
call fcn.140053280
mov eax, Ordinal_45
jmp 0x14005265a
Function at 0x1400669b0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ebp, r8d
mov r14, rdx
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
add rax, 0x18
add rcx, rax
call qword [section..data]
mov rdi, rax
test rax, rax
jne 0x1400669f2
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rsi
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x140066a39
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + reloc.WS2_32.dll_htonl]
mov r14d, dword [rbx + 0x18]
add r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov rcx, qword [rdi + 8]
mov ebp, dword [rbx + 0x20]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x140066a92
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + reloc.WS2_32.dll_htonl]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rdi + 0x10]
call qword [rbx + reloc.WS2_32.dll_htonl]
sub rbp, 1
jne 0x140066a50
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x140066ad3
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x140077bfa]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x140077bfb]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x140066aa0
mov rsi, qword [rsp + 0x48]
mov rax, rdi
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x1400ac07f
Capabilities:
Authenticate hmac
Hash data using murmur3
Parse credit card information
Parse pe header

Disassembly:
push rax
pushf
mov eax, 0xea890d6d
pushf
not eax
add eax, 0xb4ea83f3
xor eax, 0xe57e40e1
rol eax, 0x15
popf
pushf
not eax
add eax, 0xb314b4e6
xor eax, 0xf2646f7a
rol eax, 0xb9
popf
pushf
not eax
add eax, 0xabedcafb
xor eax, 0xa1c3f57b
rol eax, 0x64
popf
cmp eax, 0
jne 0x1400ac0cf
popf
pop rax
jmp 0x1400ac0cf
movzx edx, byte [rcx]
add rcx, 8
jmp fcn.1400fb7a3
Function at 0x401684
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
cmp qword [rcx + 8], 0xffffffffffffffff
mov edi, r8d
mov rsi, rdx
mov rbp, rcx
je 0x4016f0
test rdx, rdx
je 0x4016f0
cmp r8d, 1
jb 0x4016f0
xor ebx, ebx
mov rcx, qword [rbp + 8]
lea r9, [rsp + 0x40]
and dword [rsp + 0x40], 0
mov r8d, edi
and qword [rsp + 0x20], 0
sub r8d, ebx
mov edx, ebx
add rdx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4016ec
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x4016ec
add ebx, eax
cmp ebx, edi
jb 0x4016b5
mov eax, ebx
jmp 0x4016f2
xor eax, eax
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
Function at 0x401b20
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov rbx, qword [rdx + 0x208]
xor r14d, r14d
mov eax, 0x5a4d
mov dword [r8], r14d
mov r15, rdx
cmp ax, word [rbx]
jne 0x401d34
movsxd rax, dword [rbx + 0x3c]
cmp dword [rax + rbx], 0x4550
jne 0x401d34
cmp dword [rax + rbx + 0x84], r14d
jbe 0x401d34
mov edi, dword [rax + rbx + 0x88]
add rdi, rbx
mov r12d, dword [rdi + 0x14]
cmp r12d, 1
jb 0x401d34
cmp dword [rdi + 0x1c], r14d
je 0x401d34
mov ebp, dword [rdi + 0x1c]
add rbp, rbx
cmp dword [rdi + 0x20], r14d
je 0x401d34
mov r13d, dword [rdi + 0x20]
lea ecx, [r12 + 1]
imul rdx, rcx, 0x88
xor ecx, ecx
lea r9d, [r14 + 4]
mov r8d, 0x3000
add r13, rbx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
je 0x401d34
mov edx, r14d
lea r10, [rax + 8]
mov rcx, r13
mov dword [rsp + 0x80], edx
mov qword [rsp + 0x98], rcx
mov r14, rax
mov qword [rsp + 0x88], r10
sub rbp, r13
mov eax, dword [rcx + rbp]
add rax, rbx
mov qword [r14], rax
mov byte [r14 + 8], 0
cmp edx, dword [rdi + 0x18]
jae 0x401c4b
test r13, r13
je 0x401c4b
cmp dword [rcx], 0
je 0x401c4b
mov r8d, dword [rcx]
add r8, rbx
cmp r8, qword [r15 + 0x208]
jbe 0x401c4b
cmp r8, qword [r15 + 0x210]
jae 0x401c4b
mov edx, 0x7f
mov rcx, r10
call fcn.00429248
mov r10, qword [rsp + 0x88]
cmp byte [r14 + 8], 0
jne 0x401c69
mov r9, qword [r14]
lea r8, str.func_0x_.16I64X
mov edx, 0x7f
mov rcx, r10
call fcn.00401abc
mov r10, qword [rsp + 0x88]
or rax, 0xffffffffffffffff
inc rax
cmp byte [r10 + rax], 0
jne 0x401c75
mov rcx, qword [rsp + 0x90]
add eax, 9
mov edx, dword [rsp + 0x80]
mov r8d, 0x88
inc edx
add r10, r8
add r14, r8
mov dword [rsp + 0x80], edx
add dword [rcx], eax
mov rcx, qword [rsp + 0x98]
add rcx, 4
mov qword [rsp + 0x88], r10
mov qword [rsp + 0x98], rcx
cmp edx, r12d
jb 0x401c01
lea r9, [0x00401b18]
mov rdx, r12
mov rcx, rsi
call fcn.004350c0
mov rax, qword [r15 + 0x210]
mov r8d, 0x3000
imul rcx, r12, 0x88
mov qword [rcx + rsi], rax
mov rax, qword [rsp + 0x90]
mov byte [rcx + rsi + 8], 0
xor ecx, ecx
add dword [rax], 9
mov edx, dword [rax]
lea r9d, [rcx + 4]
inc edx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
lea r13, [rsi + 8]
mov rbp, rax
test rax, rax
jne 0x401d47
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov rdi, rbp
mov r14, rsi
mov rax, qword [r14]
or rbx, 0xffffffffffffffff
mov qword [rdi], rax
inc rbx
cmp byte [rbx + r13], 0
jne 0x401d57
lea rcx, [rdi + 9]
mov byte [rdi + 8], bl
mov r8, rbx
mov rdx, r13
call fcn.00424180
mov eax, 0x88
add rdi, 9
add r13, rax
add r14, rax
add rdi, rbx
sub r12, 1
jne 0x401d4d
and qword [r15 + 0x218], r12
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, rbp
jmp 0x401d36
Function at 0x4045c0
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
mov rdi, qword [rsp + 0x60]
or rax, 0xffffffffffffffff
xor ebx, ebx
mov rbp, r8
inc rax
cmp word [rdi + rax*2], bx
jne 0x4045e2
lea esi, [rax*2 + 2]
test rcx, rcx
je 0x40465f
test rdx, rdx
je 0x40465f
test rbp, rbp
je 0x40465f
test rdi, rdi
je 0x40465f
test esi, esi
je 0x40465f
lea rax, [rsp + 0x40]
mov qword [rsp + 0x40], rbx
mov r9d, 0x20106
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40465f
mov rcx, qword [rsp + 0x40]
xor r8d, r8d
mov dword [rsp + 0x28], esi
mov rdx, rbp
mov qword [rsp + 0x20], rdi
lea edi, [rax + 1]
mov r9d, edi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x40]
test eax, eax
movzx ebx, bl
cmove ebx, edi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rbp, qword [rsp + 0x50]
mov al, bl
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret

Function at 0x404704
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rsi
push rdi
sub rsp, 0x40
xor ebx, ebx
mov rdi, r9
mov rsi, r8
test r9, r9
je 0x4047aa
cmp dword [rsp + 0x70], 4
jb 0x4047aa
xor eax, eax
mov dword [r9], eax
test rcx, rcx
je 0x4047aa
test rdx, rdx
je 0x4047aa
test r8, r8
je 0x4047aa
mov r9d, dword [rsp + 0x78]
lea rax, [r11 - 0x18]
or r9d, 0x20019
mov qword [r11 - 0x18], rbx
xor r8d, r8d
mov dword [rsp + 0x68], ebx
mov qword [r11 - 0x28], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4047a6
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x68]
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x30]
mov edx, 1
test eax, eax
movzx ebx, bl
cmove ebx, edx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
jmp 0x4047ac
xor al, al
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
Function at 0x404af4
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x20], rsi
mov qword [r11 + 0x18], r8
push rbp
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov rax, rdx
mov r15, rcx
test rdx, rdx
je 0x404c71
and qword [r11 - 0x38], 0
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0xc0000000
mov rcx, rax
mov dword [rsp + 0x20], 4
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
or r14, 0xffffffffffffffff
mov rbx, rax
cmp rax, r14
je 0x404c71
and qword [rbp + 0x40], 0
lea r8, [rbp + 0x44]
xor r9d, r9d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x40], eax
cmp eax, 0xffffffff
jne 0x404b88
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x404c68
cmp qword [rbp + 0x40], 0
jne 0x404c68
mov r12, qword [r15]
xor esi, esi
mov rdi, qword [r15 + 8]
test r12, r12
je 0x404be4
test rdi, rdi
je 0x404be4
mov r14d, 0xfffffff
and dword [rbp + 0x40], 0
lea rdx, [rsi + r12]
mov r8d, edi
lea r9, [rbp + 0x40]
cmp rdi, r14
mov rcx, rbx
cmova r8d, r14d
and qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404be0
mov eax, dword [rbp + 0x40]
add rsi, rax
sub rdi, rax
jne 0x404bac
or r14, 0xffffffffffffffff
cmp rsi, qword [r15 + 8]
jne 0x404c68
and qword [rbp + 0x40], 0
lea r8, [rbp + 0x44]
mov edi, 1
xor edx, edx
mov r9d, edi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
or r15d, 0xffffffff
mov dword [rbp + 0x40], eax
cmp eax, r15d
jne 0x404c1f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rsi, r14
test eax, eax
jne 0x404c23
mov rsi, qword [rbp + 0x40]
xor r9d, r9d
mov qword [rbp + 0x38], rsi
lea r8, [rbp + 0x3c]
mov edx, esi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x38], eax
cmp eax, r15d
jne 0x404c4b
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x404c4f
mov r14, qword [rbp + 0x38]
cmp r14, rsi
jne 0x404c5d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x404c74
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor dil, dil
lea r11, [rsp + 0x40]
mov al, dil
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x404d3c
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov r15, r8
mov rbx, rcx
test rdx, rdx
je 0x404e82
mov r9d, 3
mov r8d, 0x80000000
mov dword [rsp + 0x20], r9d
call fcn.00401600
test al, al
je 0x404e82
and qword [rsp + 0x68], 0
or r12, 0xffffffffffffffff
mov rcx, qword [rbx + 8]
cmp rcx, r12
je 0x404e6b
lea rdx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x404e6b
mov rcx, qword [rsp + 0x68]
mov qword [r15], rcx
test rcx, rcx
je 0x404e6f
add rcx, 0x10
lea rdx, [0x0047b0a0]
call fcn.0042267c
mov rdi, rax
test rax, rax
je 0x404e6f
mov r14, qword [r15]
test r14, r14
je 0x404e4d
xor esi, esi
cmp qword [rbx + 8], r12
je 0x404e32
mov r13d, 0xfffffff
and dword [rsp + 0x68], 0
lea rdx, [rsi + rdi]
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x68]
mov r8d, r14d
mov rax, r14
sub r8d, esi
sub rax, rsi
cmp rax, r13
cmova r8d, r13d
and qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404e32
mov eax, dword [rsp + 0x68]
test eax, eax
je 0x404e32
add rsi, rax
cmp rsi, r14
jb 0x404ded
mov rax, qword [r15]
cmp rsi, rax
je 0x404e46
mov rcx, rdi
call fcn.00422660
xor edi, edi
jmp 0x404e53
and word [rax + rdi], 0
jmp 0x404e53
and word [r14 + rax], 0
mov rcx, qword [rbx + 8]
cmp rcx, r12
je 0x404e66
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], r12
mov rax, rdi
jmp 0x404e84
and qword [r15], 0
mov rcx, qword [rbx + 8]
cmp rcx, r12
je 0x404e82
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], r12
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x404f20
Capabilities:
Encode data using base64

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 r13
push r14
push r15
xor r11d, r11d
xor r10d, r10d
xor ebp, ebp
mov ebx, edx
test rcx, rcx
je 0x405052
test r8, r8
je 0x405052
mov byte [r8], bpl
test edx, edx
je 0x405047
lea r15d, [r9 - 8]
lea r13, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
cmp r10d, r15d
jae 0x405047
movzx edx, byte [r11 + rcx]
inc r11d
cmp r11d, ebx
jb 0x404f8e
xor r9b, r9b
mov ebp, 2
xor r14b, r14b
jmp 0x404fab
mov r14b, byte [r11 + rcx]
inc r11d
cmp r11d, ebx
jae 0x404fa3
mov r9b, byte [r11 + rcx]
inc r11d
jmp 0x404fab
xor r9b, r9b
mov ebp, 1
mov al, r9b
mov sil, r14b
shr al, 6
and sil, 0xf
shl sil, 2
or sil, al
mov rax, rdx
shr rax, 2
and dl, 3
shl dl, 4
movzx edx, dl
mov al, byte [rax + r13]
mov byte [r10 + r8], al
inc r10d
movzx eax, r14b
shr rax, 4
or rdx, rax
mov al, byte [rdx + r13]
mov byte [r10 + r8], al
inc r10d
mov eax, ebp
test ebp, ebp
je 0x40501d
sub eax, 1
je 0x40500f
cmp eax, 1
jne 0x40503e
mov byte [r10 + r8], 0x3d
inc r10d
mov byte [r10 + r8], 0x3d
jmp 0x40503b
movzx eax, sil
mov al, byte [rax + r13]
mov byte [r10 + r8], al
jmp 0x405005
movzx eax, sil
mov al, byte [rax + r13]
mov byte [r10 + r8], al
inc r10d
movzx eax, r9b
and eax, 0x3f
mov al, byte [rax + r13]
mov byte [r10 + r8], al
inc r10d
cmp r11d, ebx
jb 0x404f6b
mov byte [r10 + r8], 0
lea eax, [r10 + 1]
jmp 0x405054
xor eax, eax
mov rbx, qword [rsp + 0x20]
mov rbp, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
pop r15
pop r14
pop r13
ret
Function at 0x407c08
Capabilities:
Get socket status
Set socket configuration

Disassembly:
mov r11, rsp
push rbx
sub rsp, 0x240
mov rax, qword [rcx + 8]
mov rbx, rcx
mov dword [r11 + 8], 1
cmp rax, 0xffffffffffffffff
je 0x407cdb
mov rcx, qword [rcx + 8]
lea r8, [r11 + 8]
mov edx, 0x4004667f
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x407c83
mov rax, qword [rbx + 8]
cmp rax, 0xffffffffffffffff
je 0x407c6e
mov rcx, qword [rbx + 8]
mov edx, 2
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rbx + 8]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbx + 8], 0xffffffffffffffff
xor ecx, ecx
xorps xmm0, xmm0
movups xmmword [rbx + 0x10], xmm0
mov qword [rbx + 0x20], rcx
mov dword [rbx + 0x28], ecx
lea eax, [rcx + 1]
jmp 0x407ce2
mov eax, dword [rsp + 0x250]
test eax, eax
jne 0x407ce2
mov rax, qword [rbx + 8]
lea rdx, [rsp + 0x30]
and dword [rsp + 0x258], 0
xor r9d, r9d
mov qword [rsp + 0x38], rax
xor r8d, r8d
lea rax, [rsp + 0x258]
mov dword [rsp + 0x30], 1
xor ecx, ecx
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x25c], 0x3e8
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
mov eax, 1
jg 0x407ce2
mov eax, dword [rsp + 0x250]
add rsp, 0x240
pop rbx
ret
Function at 0x407ffc
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x50
mov r14, r9
mov rsi, r8
mov rdi, rcx
test r9, r9
je 0x408024
and dword [r9], 0
test rdx, rdx
je 0x408184
mov rax, qword [rcx + 8]
cmp rax, 0xffffffffffffffff
je 0x408184
xor ebp, ebp
mov qword [rsp + 0x48], rdx
and dword [rsp + 0x40], ebp
xor r15d, r15d
test r8, r8
je 0x408104
mov r13d, 0x200000
cmp byte [rdi + 0x449], 0
jne 0x408109
and dword [rsp + 0x88], 0
mov rbx, qword [rdi + 0x450]
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
lea r9, [rsp + 0x88]
mov r8d, 1
add rax, rbx
lea rdx, [rsp + 0x40]
mov qword [rdi + 0x458], rax
cmp rsi, r13
mov rcx, qword [rdi + 8]
mov eax, esi
cmova eax, r13d
and qword [rsp + 0x30], 0
and qword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
mov dword [rsp + 0x40], eax
call qword [sym.imp.WS2_32.dll_WSASend]
test eax, eax
je 0x4080ea
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r15d, eax
cmp eax, 0x2733
jne 0x408104
inc ebp
cmp ebp, 0x7d0
je 0x408104
mov ecx, 5
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4080fb
mov eax, dword [rsp + 0x88]
xor ebp, ebp
sub rsi, rax
add qword [rsp + 0x48], rax
test rsi, rsi
jne 0x408058
test rsi, rsi
je 0x408169
lea rcx, [rdi + 0x22c]
mov r9, rsi
lea r8, str.raw___send_failed___zu_bytes_needed
mov edx, 0xff
call fcn.0040457c
test r14, r14
je 0x40812c
mov dword [r14], r15d
mov rax, qword [rdi + 8]
cmp rax, 0xffffffffffffffff
je 0x408157
mov rcx, qword [rdi + 8]
mov edx, 2
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rdi + 8]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rdi + 8], 0xffffffffffffffff
xor eax, eax
xorps xmm0, xmm0
movups xmmword [rdi + 0x10], xmm0
mov qword [rdi + 0x20], rax
mov dword [rdi + 0x28], eax
jmp 0x408186
mov rbx, qword [rdi + 0x450]
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
add rax, rbx
mov qword [rdi + 0x458], rax
mov al, 1
jmp 0x408186
xor al, al
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop rdi
pop rsi
ret