joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140147290
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], rbx
push rdi
sub rsp, 0x1a0
cmp dword [rcx + 0xbc], 3
mov rdi, rdx
mov rbx, rcx
jne 0x1401474a5
cmp byte [rcx + 0x3ed], 0
mov qword [rax + 0x10], rsi
jne 0x140147495
cmp byte [rcx + 0x405], 0
jne 0x140147495
mov rsi, qword [rcx]
lea r8, [rax + 8]
lea rdx, [rax - 0x88]
mov rcx, rdi
mov dword [rax + 8], pe_nt_image_headers64
call qword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x140147326
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x20]
mov r8d, pe_nt_image_headers64
mov ecx, eax
mov ebx, eax
call fcn.14015f870
lea rdx, str.getpeername___failed_with_errno__d:__s
mov r8d, ebx
mov r9, rax
mov rcx, rsi
call fcn.140141fa0
jmp 0x14014749d
lea rcx, [rsp + 0xa0]
xor edx, edx
mov r8d, pe_nt_image_headers64
mov dword [rsp + 0x1c0], pe_nt_image_headers64
call sub.msvcrt.dll_memset
lea r8, [rsp + 0x1c0]
lea rdx, [rsp + 0xa0]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140147397
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x20]
mov r8d, pe_nt_image_headers64
mov ecx, eax
mov ebx, eax
call fcn.14015f870
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, ebx
mov r9, rax
mov rcx, rsi
call fcn.140141fa0
jmp 0x14014749d
mov edx, dword [rsp + 0x1b0]
lea rdi, [rbx + 0x18e]
lea r9, [rbx + 0x1bc]
lea rcx, [rsp + 0x120]
mov r8, rdi
call fcn.140146510
test al, al
jne 0x1401473fe
call qword [sym.imp.msvcrt.dll__errno]
mov rbx, rax
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rbx]
lea rdx, [rsp + 0x20]
mov r8d, pe_nt_image_headers64
mov rdi, rax
call fcn.14015f870
mov r8d, dword [rdi]
lea rdx, str.ssrem_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rsi
call fcn.140141fa0
jmp 0x14014749d
movups xmm0, xmmword [rdi]
mov eax, dword [rdi + 0x28]
movups xmm1, xmmword [rdi + 0x10]
mov edx, dword [rsp + 0x1c0]
lea r9, [rbx + 0x1f0]
lea r8, [rbx + 0x1c0]
lea rcx, [rsp + 0xa0]
movups xmmword [rbx + 0x88], xmm0
movsd xmm0, qword [rdi + 0x20]
movups xmmword [rbx + 0x98], xmm1
movsd qword [rbx + 0xa8], xmm0
mov dword [rbx + 0xb0], eax
movzx eax, word [rdi + 0x2c]
mov word [rbx + 0xb4], ax
call fcn.140146510
test al, al
jne 0x140147495
call qword [sym.imp.msvcrt.dll__errno]
mov rbx, rax
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rbx]
lea rdx, [rsp + 0x20]
mov r8d, pe_nt_image_headers64
mov rdi, rax
call fcn.14015f870
mov r8d, dword [rdi]
lea rdx, str.ssloc_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rsi
call fcn.140141fa0
jmp 0x14014749d
mov rcx, rbx
call fcn.140146ed0
mov rsi, qword [rsp + 0x1b8]
mov rbx, qword [rsp + 0x1c8]
add rsp, 0x1a0
pop rdi
ret
Function at 0x140147e40
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x60
xor esi, esi
mov rdi, rdx
mov rbx, rcx
mov eax, esi
lea r9, [rsp + 0x70]
lea r8d, [rsi + 8]
cmp byte [rcx + 0xea7], al
mov edx, 0xffff
mov rcx, rdi
setne al
mov dword [rsp + 0x20], 4
mov dword [rsp + 0x70], eax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140147eae
lea rdx, str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
mov r8, rdi
mov rcx, rbx
call fcn.140142100
mov rbx, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x88]
add rsp, 0x60
pop rdi
ret
mov ecx, dword [rbx + 0xe0c]
mov dword [rsp + 0x50], 1
call fcn.14014baf0
imul ecx, eax, 0x3e8
mov dword [rsp + 0x70], ecx
mov dword [rsp + 0x54], ecx
mov ecx, dword [rbx + 0xe10]
call fcn.14014baf0
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rsi
lea r8, [rsp + 0x50]
mov r9d, recvfrom
mov edx, 0x98000004
imul ecx, eax, 0x3e8
lea rax, [rsp + 0x80]
mov dword [rsp + 0x70], ecx
mov dword [rsp + 0x58], ecx
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 0x140147f40
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.140142100
mov rbx, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x88]
add rsp, 0x60
pop rdi
ret

Function at 0x140147f60
Capabilities:
Set socket configuration

Disassembly:
mov r11, rsp
push rbx
sub rsp, 0xb0
mov rbx, qword [rcx]
mov rax, rdx
mov edx, 6
lea r9, [r11 + 8]
lea r8d, [rdx - 5]
mov rcx, rax
mov dword [r11 + 8], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140147fce
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x30]
mov r8d, pe_nt_image_headers64
mov ecx, eax
call fcn.14015f870
lea rdx, str.Could_not_set_TCP_NODELAY:__s_n
mov rcx, rbx
mov r8, rax
call fcn.140142100
add rsp, 0xb0
pop rbx
ret
lea rdx, str.TCP_NODELAY_set_n
mov rcx, rbx
call fcn.140142100
add rsp, 0xb0
pop rbx
ret
Function at 0x140159630
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x1028
call fcn.140067b50
sub rsp, rax
call qword [sym.imp.msvcrt.dll_getenv]
mov byte [rsp + 0x20], 0
test rax, rax
je 0x14015967b
lea rdx, [rsp + 0x20]
mov r8d, 0x1000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [rsp + 0x20], 0
je 0x14015967b
lea rcx, [rsp + 0x20]
call qword [case.0x14013eff7.0]
add rsp, 0x1028
ret
xor eax, eax
add rsp, 0x1028
ret

Function at 0x14015b630
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
push rsi
push rdi
push r14
sub rsp, 0x50
mov rdi, r8
xor r14d, r14d
mov rbx, r9
mov rsi, rdx
mov rbp, rcx
mov r8, r9
mov rcx, rdi
xor edx, edx
mov qword [rax - 0x28], r14
mov qword [rax - 0x30], r14
mov dword [rax + 0x20], r14d
mov dword [rax - 0x38], 4
mov dword [rax - 0x34], ebx
call sub.msvcrt.dll_memset
mov r9d, dword [rsp + 0x90]
lea rcx, [rsp + 0x40]
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x14015b74a
mov edx, dword [rsp + 0x98]
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x38]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x14015b728
mov rcx, qword [rsp + 0x38]
xor r9d, r9d
mov r8d, esi
mov rdx, rbp
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x14015b728
mov rcx, qword [rsp + 0x38]
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x88]
lea edx, [r14 + 4]
mov dword [rsp + 0x20], r14d
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x14015b728
mov eax, dword [rsp + 0x88]
cmp rbx, rax
jb 0x14015b728
mov rcx, qword [rsp + 0x38]
lea r9, [rsp + 0x34]
lea edx, [r14 + 2]
mov r8, rdi
mov dword [rsp + 0x20], r14d
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14015b738
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14015b74a
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
add rsp, 0x50
pop r14
pop rdi
pop rsi
ret
Function at 0x14015eb00
Capabilities:
Resolve dns

Disassembly:
push rbx
push r12
push r13
push r14
push r15
sub rsp, 0x20
xor r13d, r13d
mov r12, r9
mov qword [r9], r13
lea r9, [rsp + 0x68]
mov ebx, r13d
mov r15d, r13d
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov r14d, eax
test eax, eax
jne 0x14015ecc4
mov qword [rsp + 0x58], rsi
mov rsi, qword [rsp + 0x68]
mov qword [rsp + 0x60], rdi
test rsi, rsi
je 0x14015eca4
mov qword [rsp + 0x50], rbp
mov eax, dword [rsi + 4]
cmp eax, 2
jne 0x14015eb5d
lea ebp, [rax + 0xe]
jmp 0x14015eb69
cmp eax, 0x17
jne 0x14015ec11
lea ebp, [rax + 5]
cmp qword [rsi + 0x20], r13
je 0x14015ec11
mov rax, qword [rsi + 0x10]
test rax, rax
je 0x14015ec11
cmp rax, rbp
jb 0x14015ec11
mov ecx, gethostbyaddr
call qword [sub.msvcrt.dll_malloc]
mov rdi, rax
test rax, rax
je 0x14015ec4c
mov ecx, dword [rsi]
mov dword [rax], ecx
mov ecx, dword [rsi + 4]
mov dword [rax + 4], ecx
mov ecx, dword [rsi + 8]
mov dword [rax + 8], ecx
mov ecx, dword [rsi + 0xc]
mov dword [rax + 0x10], ebp
mov dword [rax + 0xc], ecx
mov rcx, rbp
mov qword [rax + 0x20], r13
mov qword [rax + 0x18], r13
mov qword [rax + 0x28], r13
call qword [sub.msvcrt.dll_malloc]
mov qword [rdi + 0x20], rax
test rax, rax
je 0x14015ec3b
mov rdx, qword [rsi + 0x20]
mov r8, rbp
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsi + 0x18]
test rcx, rcx
je 0x14015ebfe
call qword [case.0x14013eff7.0]
mov qword [rdi + 0x18], rax
test rax, rax
je 0x14015ec20
test rbx, rbx
cmove rbx, rdi
test r15, r15
je 0x14015ec0e
mov qword [r15 + 0x28], rdi
mov r15, rdi
mov rsi, qword [rsi + 0x28]
test rsi, rsi
jne 0x14015eb50
jmp 0x14015ec52
mov rcx, qword [rdi + 0x20]
mov r14d, 8
call qword [fcn.1400677fe]
mov rcx, rdi
call qword [fcn.1400677fe]
jmp 0x14015ec52
mov rcx, rdi
mov r14d, 8
call qword [fcn.1400677fe]
jmp 0x14015ec52
mov r14d, 8
mov rcx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x50]
test rcx, rcx
je 0x14015ec67
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test r14d, r14d
je 0x14015ec9f
test rbx, rbx
je 0x14015ec9a
mov rcx, qword [rbx + 0x20]
call qword [fcn.1400677fe]
mov rcx, qword [rbx + 0x18]
call qword [fcn.1400677fe]
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call qword [fcn.1400677fe]
mov rbx, rdi
test rdi, rdi
jne 0x14015ec71
mov rbx, r13
jmp 0x14015ecb3
test rbx, rbx
jne 0x14015ecb3
mov r14d, 0x2af9
mov ecx, r14d
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rdi, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x58]
mov qword [r12], rbx
mov eax, r14d
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rbx
ret
Function at 0x140163c40
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x60
mov edx, 1
mov ebx, 2
mov rsi, r9
lea r8d, [rdx + 5]
mov ecx, ebx
mov dword [rsp + 0x34], reloc.WS2_32.dll_recv
mov dword [rsp + 0x30], 1
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140163e31
xor eax, eax
mov ecx, 0x7f000001
mov qword [rsp + 0x38], rax
mov word [rsp + 0x38], bx
mov qword [rsp + 0x40], rax
call qword [sym.imp.WS2_32.dll_htonl]
lea r9, [rsp + 0x30]
lea r8d, [rbx + 2]
mov dword [rsp + 0x3c], eax
xor eax, eax
mov edx, 0xffff
mov rcx, rdi
mov qword [rsi + 8], 0xffffffffffffffff
mov qword [rsi], 0xffffffffffffffff
mov word [rsp + 0x3a], ax
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x140163e15
lea r8d, [rbx + 0xe]
lea rdx, [rsp + 0x38]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x140163e15
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x38]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x140163e15
lea edx, [rbx - 1]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x140163e15
lea edx, [rbx - 1]
xor r8d, r8d
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsi], rax
cmp rax, 0xffffffffffffffff
je 0x140163e15
lea r8d, [rbx + 0xe]
lea rdx, [rsp + 0x38]
mov rcx, rax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140163e15
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rsi + 8], rax
cmp rax, 0xffffffffffffffff
je 0x140163e15
lea r8, [0x1401bbce8]
lea edx, [rbx + 0xa]
lea rcx, [rsp + 0x48]
mov r9, rsi
call fcn.140156160
lea rax, [rsp + 0x48]
or rbx, 0xffffffffffffffff
inc rbx
cmp byte [rax + rbx], 0
jne 0x140163da1
mov rcx, qword [rsi]
lea rdx, [rsp + 0x48]
xor r9d, r9d
mov r8d, ebx
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
cmp rcx, rbx
jne 0x140163e15
mov rcx, qword [rsi + 8]
xor r9d, r9d
lea rdx, [rsp + 0x54]
lea r8d, [r9 + 0xc]
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
cmp rcx, rbx
jne 0x140163e15
lea rdx, [rsp + 0x54]
lea rcx, [rsp + 0x48]
mov r8, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x140163e15
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rsi]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rsi + 8]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
or eax, 0xffffffff
add rsp, 0x60
pop rdi
ret

Function at 0x140163e50
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x28
xor eax, eax
test edx, edx
lea r8, [rsp + 0x38]
setne al
mov edx, 0x8004667e
mov dword [rsp + 0x38], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
add rsp, 0x28
ret
Function at 0x140169300
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
movsxd rbx, edx
mov rdi, rcx
mov byte [rcx], 0
mov edx, ebx
call qword [sym.imp.WS2_32.dll_gethostname]
mov byte [rbx + rdi - 1], 0
test eax, eax
jne 0x14016933a
lea edx, [rax + 0x2e]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_strchr]
test rax, rax
je 0x140169338
mov byte [rax], 0
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140170090
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
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
mov r14, rdx
add rax, 0x18
add rcx, rax
call qword [sub.msvcrt.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x1401700d2
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 [rsp + 0x48], rsi
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x140170115
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]
mov rdx, qword [rdi + 8]
add r14, qword [rdi + 0x10]
mov rcx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov ebp, dword [rbx + 0x20]
mov rcx, qword [rdi + 8]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x140170171
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
mov r8d, 1
xor al, 0x36
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
mov r8d, 1
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 0x10]
call qword [rbx + reloc.WS2_32.dll_htonl]
dec rbp
jne 0x140170130
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x1401701b3
nop dword [rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x1401be791]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1401be792]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x140170180
mov rsi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
mov rax, rdi
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x140170a84
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x40
cmp dword [0x1407a3270], 0
mov r14, rdx
mov r15, rcx
lea rbx, [0x1407a3280]
jne 0x140170ad1
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, rbx
mov dword [0x1407a32a8], eax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x1407a3270], 1
mov ecx, dword [0x1407a32a8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbp, rax
test rax, rax
jne 0x140170ba6
mov rcx, qword [0x14079f19c]
lea edx, [rax + 8]
lea r8d, [rax + 0x28]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x140170bd1
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x1407a3278]
test rax, rax
je 0x140170b21
mov qword [rax], rbp
mov rcx, rbx
mov qword [rbp + 8], rax
mov qword [0x1407a3278], rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
and dword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
lea r9, [rbp + 0x20]
mov r8, rdi
mov rcx, rax
mov rdx, rbx
mov dword [rsp + 0x20], 0x100000
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rdx, qword [rbp + 0x20]
lea rcx, [rbp + 0x18]
lea r8, [0x140170bec]
mov r9, rbp
mov dword [rsp + 0x28], 8
or dword [rsp + 0x20], 0xffffffff
call qword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
mov ecx, dword [0x1407a32a8]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [0x14079f19c]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x140170bd1
mov qword [rax + 8], r15
mov qword [rax + 0x10], r14
mov rcx, qword [rbp + 0x10]
mov qword [rax], rcx
mov qword [rbp + 0x10], rax
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x140014130
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.140006050
sub rsp, rax
mov rax, qword [0x14002e040]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.140012d10
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x14001417f
mov rax, rbp
jmp 0x140014287
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x1130d0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.140015250
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x1130d0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140014283
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140014283
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.140015250
test rax, rax
js 0x140014283
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140014283
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140014275
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140014275
cmp byte [rcx], 0xd
jne 0x14001425b
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x14001426a
cmp byte [rcx + 1], 0xa
jne 0x14001426a
inc rcx
jmp 0x14001426a
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x2e480]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x14001423d
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x140014287
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.140005c60
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret

Function at 0x1400144a8
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1400144be
mov al, 1
jmp 0x14001451e
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1400144cf
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14001451c
mov ecx, dword [rcx + 0x18]
nop
call fcn.140018c04
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14001451c
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14001451c
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14001451c
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14001451e
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x1400145f0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1401130d0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x140014647
cmp word [rdx], r13w
jne 0x140014647
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14001464c
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140014771
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x140014792
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140014685
mov rdx, r9
mov word [rbx], cx
jmp 0x1400146ac
cmp r9, r8
jae 0x1400146bc
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x140014666
jmp 0x140014771
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140014766
cmp dword [rsp + 0x80], esi
je 0x140014766
lea r8, [0x1401130d0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14001473e
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14001470e
mov word [rbx], r13w
jmp 0x14001476e
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x14001471b
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14001476e
cmp word [rsp + 0x70], r13w
jne 0x14001474b
cmp rbx, r14
je 0x140014708
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140015258
cmp word [rsp + 0x70], r13w
je 0x140014771
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1401130d0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14001476b
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140014771