joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180075b00
Capabilities:
Send data
Send data on socket

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x60
mov rax, qword [0x180141b10]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov r14, qword [rsp + 0xb0]
mov rbx, rcx
xor ecx, ecx
mov rsi, r8
mov rdi, rdx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor ebp, ebp
lea r9, [rsp + 0x50]
mov r8d, esi
mov qword [rsp + 0x30], rbp
mov rdx, rdi
mov rcx, rbx
mov qword [rsp + 0x28], rbp
mov dword [rsp + 0x20], ebp
mov dword [rsp + 0x50], ebp
call qword [sym.imp.WS2_32.dll_WSASend]
mov edi, eax
call fcn.1800c45f0
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x48], rbx
mov dword [rsp + 0x40], eax
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [r14], xmm0
mov ecx, dword [r14]
cmp ecx, 0x40
jne 0x180075b8f
mov dword [rsp + 0x40], 0x2746
jmp 0x180075b9f
cmp ecx, 0x4d2
jne 0x180075bb2
mov dword [rsp + 0x40], 0x274d
call fcn.1800c45f0
mov qword [rsp + 0x48], rax
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [r14], xmm0
test edi, edi
je 0x180075bbb
or eax, 0xffffffff
jmp 0x180075bd6
mov dword [rsp + 0x40], ebp
call fcn.1800c45f0
mov qword [rsp + 0x48], rax
mov eax, dword [rsp + 0x50]
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [r14], xmm0
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1800a0c30
add rsp, 0x60
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x180075d00
Capabilities:
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x58
mov rax, qword [0x180141b10]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov esi, ecx
xor ecx, ecx
mov rbp, r9
mov edi, r8d
mov ebx, edx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor r9d, r9d
mov r8d, edi
mov edx, ebx
mov ecx, esi
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov rdi, rax
call fcn.1800c45f0
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rbp], xmm0
cmp rdi, 0xffffffffffffffff
jne 0x180075d78
or rax, rdi
jmp 0x180075dc0
cmp esi, 0x17
jne 0x180075da2
lea r9, [rsp + 0x40]
lea edx, [rsi + 0x12]
lea r8d, [rsi + 4]
mov rcx, rdi
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x30], 0
call fcn.1800c45f0
mov qword [rsp + 0x38], rax
mov rax, rdi
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rbp], xmm0
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1800a0c30
add rsp, 0x58
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x180075de0
Capabilities:
Get socket status

Disassembly:
push rbx
push rdi
sub rsp, 0x278
mov rax, qword [0x180141b10]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov rdi, r8
mov rbx, rcx
cmp rcx, 0xffffffffffffffff
jne 0x180075e29
mov dword [rsp + 0x30], 0x2719
call fcn.1800c45f0
mov qword [rsp + 0x38], rax
or eax, ebx
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdi], xmm0
jmp 0x180075ebd
mov qword [rsp + 0x298], rbp
mov qword [rsp + 0x58], rcx
xor ebp, ebp
xor ecx, ecx
mov qword [rsp + 0x270], rsi
mov dword [rsp + 0x50], 1
mov qword [rsp + 0x40], rbp
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea ecx, [rbx + 1]
lea rdx, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rbp
call qword [sym.imp.WS2_32.dll_select]
mov esi, eax
call fcn.1800c45f0
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdi], xmm0
test esi, esi
je 0x180075e95
jle 0x180075eab
mov dword [rsp + 0x30], ebp
call fcn.1800c45f0
mov qword [rsp + 0x38], rax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdi], xmm0
mov rbp, qword [rsp + 0x298]
mov eax, esi
mov rsi, qword [rsp + 0x270]
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1800a0c30
add rsp, 0x278
pop rdi
pop rbx
ret

Function at 0x180075ee0
Capabilities:
Get socket status

Disassembly:
push rbx
push rdi
sub rsp, 0x278
mov rax, qword [0x180141b10]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov rdi, r8
mov rbx, rcx
cmp rcx, 0xffffffffffffffff
jne 0x180075f29
mov dword [rsp + 0x30], 0x2719
call fcn.1800c45f0
mov qword [rsp + 0x38], rax
or eax, ebx
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdi], xmm0
jmp 0x180075fbc
mov qword [rsp + 0x298], rbp
mov qword [rsp + 0x58], rcx
xor ebp, ebp
xor ecx, ecx
mov qword [rsp + 0x270], rsi
mov dword [rsp + 0x50], 1
mov qword [rsp + 0x40], rbp
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea ecx, [rbx + 1]
lea r8, [rsp + 0x50]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x20], rbp
call qword [sym.imp.WS2_32.dll_select]
mov esi, eax
call fcn.1800c45f0
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdi], xmm0
test esi, esi
je 0x180075f94
jle 0x180075faa
mov dword [rsp + 0x30], ebp
call fcn.1800c45f0
mov qword [rsp + 0x38], rax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdi], xmm0
mov rbp, qword [rsp + 0x298]
mov eax, esi
mov rsi, qword [rsp + 0x270]
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1800a0c30
add rsp, 0x278
pop rdi
pop rbx
ret
Function at 0x180075fe0
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x470
mov rax, qword [0x180141b10]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov rdi, rdx
mov rbx, rcx
cmp rcx, 0xffffffffffffffff
jne 0x18007602c
mov dword [rsp + 0x30], 0x2719
call fcn.1800c45f0
mov qword [rsp + 0x38], rax
or eax, ebx
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdi], xmm0
jmp 0x1800760c6
mov qword [rsp + 0x258], rcx
mov qword [rsp + 0x48], rcx
xor ecx, ecx
mov qword [rsp + 0x490], rsi
mov dword [rsp + 0x250], 1
mov dword [rsp + 0x40], 1
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea ecx, [rbx + 1]
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x250]
xor edx, edx
mov qword [rsp + 0x20], 0
call qword [sym.imp.WS2_32.dll_select]
mov esi, eax
call fcn.1800c45f0
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdi], xmm0
test esi, esi
js 0x1800760bc
mov dword [rsp + 0x30], 0
call fcn.1800c45f0
mov qword [rsp + 0x38], rax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdi], xmm0
mov eax, esi
mov rsi, qword [rsp + 0x490]
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.1800a0c30
mov rbx, qword [rsp + 0x498]
add rsp, 0x470
pop rdi
ret

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

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x180141b10]
xor rax, rsp
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x40]
mov rbx, rcx
mov byte [rsp + 0x40], 0
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], 1
call fcn.1800c45f0
mov rbx, qword [rbx + 8]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor eax, eax
lea r9, [rsp + 0x44]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
lea rdx, [rsp + 0x48]
lea r8d, [rax + 1]
mov rcx, rbx
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x20], eax
call qword [sym.imp.WS2_32.dll_WSASend]
mov ebx, eax
call fcn.1800c45f0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
je 0x1800762e4
cmp eax, 0x4d2
jne 0x1800762e9
call fcn.1800c45f0
test ebx, ebx
jne 0x1800762f2
call fcn.1800c45f0
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1800a0c30
add rsp, 0x60
pop rbx
ret

Function at 0x180078420
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x1e0
mov rax, qword [0x180141b10]
xor rax, rsp
mov qword [rsp + 0x1d0], rax
movzx edi, dl
mov rbx, rcx
mov eax, 1
lock xadd dword [0x180153dd0], eax
inc eax
cmp eax, 1
jne 0x18007846d
lea ecx, [rax + 1]
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_WSAStartup]
xchg dword [0x180153dd4], eax
test dil, dil
je 0x180078480
xor eax, eax
lock xadd dword [0x180153dd4], eax
test eax, eax
jne 0x1800784a4
mov rax, rbx
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.1800a0c30
mov rbx, qword [rsp + 0x1f0]
add rsp, 0x1e0
pop rdi
ret
xor ecx, ecx
mov qword [rsp + 0x20], rcx
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x28], rcx
call fcn.1800c45f0
lea rdx, str.winsock
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x28], rax
call fcn.1800741e0
int3
Function at 0x180079ed0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x180141b10]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rsi, rdx
mov rbx, rcx
call fcn.1800c45f0
mov rbp, qword [rbx]
mov edi, dword [rsi + 4]
cmp rbp, 0xffffffffffffffff
jne 0x180079f0c
mov dword [rsp + 0x30], 0x2719
jmp 0x180079f68
cmp edi, 0x80
jne 0x180079f18
or byte [rbx + 8], 8
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov r9, rsi
mov r8d, edi
mov edx, 0xffff
mov rcx, rbp
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.1800c45f0
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movaps xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0x30], xmm0
test edi, edi
jne 0x180079f7d
mov dword [rsp + 0x30], edi
call fcn.1800c45f0
mov qword [rsp + 0x38], rax
movaps xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0x30], xmm0
cmp dword [rsp + 0x30], 0
jne 0x180079fa1
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1800a0c30
mov rbx, qword [rsp + 0x80]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
lea rdx, str.set_option
lea rcx, [rsp + 0x30]
call fcn.1800741e0
int3
Function at 0x1800a4c68
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
xor edx, edx
jmp fcn.1800a4ad0
Function at 0x1800c5ec0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
jmp 0x1800c60a0
push rdi
push r14
push r15
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x68], rsi
mov ecx, dword [0x180142d20]
cmp ecx, 0xffffffff
jne 0x1800c60cd
xor r14d, r14d
jmp 0x1800c60d6
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r14, rax
mov qword [rsp + 0x50], r14
test r14, r14
je 0x1800c6208
mov rdi, qword [r14 + 0x18]
cmp qword [r14 + 0x28], 0
jne 0x1800c60fa
test rdi, rdi
je 0x1800c61e1
jmp 0x1800c6100
test rdi, rdi
je 0x1800c6154
nop
mov rax, qword [rdi + 8]
mov qword [r14 + 0x18], rax
mov rcx, qword [rdi]
test rcx, rcx
je 0x1800c6137
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rbx, qword [rdi]
mov rax, qword [rbx]
xor edx, edx
mov rcx, rbx
call qword [rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rdi, qword [r14 + 0x18]
test rdi, rdi
jne 0x1800c6100
mov rsi, qword [r14 + 0x20]
mov rbx, qword [rsi]
cmp rbx, rsi
je 0x1800c60e4
mov rdi, rbx
cmp byte [rbx + 0x19], 0
jne 0x1800c61ae
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
jne 0x1800c618e
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
jne 0x1800c61ae
nop
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x1800c6180
jmp 0x1800c61ae
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x1800c61ab
cmp rbx, qword [rax + 0x10]
jne 0x1800c61ab
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1800c6198
mov rbx, rax
mov rcx, qword [rdi + 0x28]
test rcx, rcx
je 0x1800c61c6
mov rdx, qword [rdi + 0x38]
test rdx, rdx
je 0x1800c61c6
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov r8, rdi
lea rdx, [rsp + 0x58]
lea rcx, [r14 + 0x20]
call fcn.1800c59c0
cmp rbx, rsi
jne 0x1800c6160
jmp 0x1800c60e4
lea rdx, [0x1800c5980]
lea rcx, [0x180151308]
call fcn.1800c55a0
mov ecx, dword [0x180142d20]
cmp ecx, 0xffffffff
je 0x1800c6208
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
test r14, r14
je 0x1800c6232
lock dec dword [r14 + 8]
jne 0x1800c6232
mov rax, qword [r14]
xor edx, edx
mov rcx, r14
call qword [rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
Function at 0x1800c60a0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
jmp 0x1800c60a0
push rdi
push r14
push r15
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x68], rsi
mov ecx, dword [0x180142d20]
cmp ecx, 0xffffffff
jne 0x1800c60cd
xor r14d, r14d
jmp 0x1800c60d6
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r14, rax
mov qword [rsp + 0x50], r14
test r14, r14
je 0x1800c6208
mov rdi, qword [r14 + 0x18]
cmp qword [r14 + 0x28], 0
jne 0x1800c60fa
test rdi, rdi
je 0x1800c61e1
jmp 0x1800c6100
test rdi, rdi
je 0x1800c6154
nop
mov rax, qword [rdi + 8]
mov qword [r14 + 0x18], rax
mov rcx, qword [rdi]
test rcx, rcx
je 0x1800c6137
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rbx, qword [rdi]
mov rax, qword [rbx]
xor edx, edx
mov rcx, rbx
call qword [rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rdi, qword [r14 + 0x18]
test rdi, rdi
jne 0x1800c6100
mov rsi, qword [r14 + 0x20]
mov rbx, qword [rsi]
cmp rbx, rsi
je 0x1800c60e4
mov rdi, rbx
cmp byte [rbx + 0x19], 0
jne 0x1800c61ae
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
jne 0x1800c618e
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
jne 0x1800c61ae
nop
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x1800c6180
jmp 0x1800c61ae
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x1800c61ab
cmp rbx, qword [rax + 0x10]
jne 0x1800c61ab
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1800c6198
mov rbx, rax
mov rcx, qword [rdi + 0x28]
test rcx, rcx
je 0x1800c61c6
mov rdx, qword [rdi + 0x38]
test rdx, rdx
je 0x1800c61c6
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov r8, rdi
lea rdx, [rsp + 0x58]
lea rcx, [r14 + 0x20]
call fcn.1800c59c0
cmp rbx, rsi
jne 0x1800c6160
jmp 0x1800c60e4
lea rdx, [0x1800c5980]
lea rcx, [0x180151308]
call fcn.1800c55a0
mov ecx, dword [0x180142d20]
cmp ecx, 0xffffffff
je 0x1800c6208
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
test r14, r14
je 0x1800c6232
lock dec dword [r14 + 8]
jne 0x1800c6232
mov rax, qword [r14]
xor edx, edx
mov rcx, r14
call qword [rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
Function at 0x1400014e0
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov qword [rsp + 0x90], rcx
mov r12, rdx
call sub.msvcrt.dll_wcslen
mov r15, qword [rsp + 0x90]
mov rbp, rax
jmp 0x140001581
add rbp, 1
mov rax, rbx
sub rax, r15
sar rax, 1
sub rbp, rax
lea r10, [rbp + rbp]
lea ebp, [rdi - 1]
test r9d, r9d
jg 0x140001660
sub ebp, r9d
mov dword [rsp + 0x28], r9d
mov r8d, edi
mov rdx, rsi
movsxd rbp, ebp
mov qword [rsp + 0x38], r10
mov rcx, r13
mov qword [rsp + 0x30], r11
movzx ebp, word [rsi + rbp*2]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r9d, dword [rsp + 0x28]
test r9d, r9d
je 0x140001579
mov r11, qword [rsp + 0x30]
mov r8, qword [rsp + 0x38]
mov rdx, rbx
lea rcx, [rbx + r11*2]
call sub.msvcrt.dll_memmove
mov word [rsi + rdi*2 - 2], bp
mov rbp, r14
lea rdx, section..rdata
mov rcx, r15
call sub.msvcrt.dll_wcsstr
mov rsi, rax
test rax, rax
je 0x1400016c8
lea r13, [rax + 4]
lea rdx, section..rdata
mov rcx, r13
call sub.msvcrt.dll_wcsstr
test rax, rax
je 0x1400016c8
xor edx, edx
lea rbx, [rax + 4]
xor r8d, r8d
mov rcx, r13
mov word [rax], dx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r9, rbx
sub r9, rsi
movsxd rdi, eax
sar r9, 1
not r9d
add r9d, edi
movsxd r11, r9d
lea r14, [r11 + rbp]
cmp r14, r12
jb 0x140001510
lea r12, [r12 + r12*2 + 0x30]
lea rax, [r14 + 1]
mov dword [rsp + 0x30], r9d
shr r12, 1
mov qword [rsp + 0x28], r11
cmp r14, r12
cmovae r12, rax
cmp r15, qword [rsp + 0x90]
lea rdx, [r12 + r12]
je 0x140001690
mov rcx, r15
call sub.msvcrt.dll_realloc
mov r11, qword [rsp + 0x28]
mov r9d, dword [rsp + 0x30]
test rax, rax
mov rcx, rax
je 0x1400016dc
add rbp, 1
mov rax, rcx
sub rax, r15
mov r15, rcx
add rsi, rax
add rbx, rax
lea r13, [rsi + 4]
jmp 0x140001514
lea rcx, [rbx + r11*2]
mov r8, r10
mov rdx, rbx
movsxd rbp, ebp
call sub.msvcrt.dll_memmove
movzx ebp, word [rsi + rbp*2]
mov r8d, edi
mov rdx, rsi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x140001579
mov rcx, rdx
call sub.msvcrt.dll_malloc
mov rcx, rax
test rax, rax
je 0x1400016dc
add rbp, 1
mov rdx, r15
lea r8, [rbp + rbp]
call sub.msvcrt.dll_memcpy
mov r11, qword [rsp + 0x28]
mov r9d, dword [rsp + 0x30]
mov rcx, rax
jmp 0x14000163e
mov rax, r15
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 2
call qword [fcn.140002cf0]
mov r8, r13
lea rdx, str.Substituting__s_results_in_too_large_a_command_line_n
mov rcx, rax
call sub.msvcrt.dll_fwprintf
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop word cs:[rax + rax]
nop
Function at 0x140001710
Capabilities:
Accept command line arguments

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rdi, rcx
mov rbp, rdx
lea rdx, [rsp + 0x2c]
mov rsi, r8
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov rbx, rax
mov eax, dword [rsp + 0x2c]
test eax, eax
jle 0x140001795
mov rdi, qword [rbx]
movzx ecx, word [rdi]
cmp cx, 0x5c
je 0x140001788
call qword [sym.imp.msvcrt.dll_isalpha]
test eax, eax
je 0x140001754
cmp word [rdi + 2], 0x3a
je 0x140001788
mov rdx, rbp
mov rcx, rsi
call sub.msvcrt.dll_wcscpy
mov rdx, qword [rbx]
mov r8d, 0x1000
mov rcx, rsi
call fcn.140001430
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rdx, rdi
mov rcx, rsi
call sub.msvcrt.dll_wcscpy
jmp 0x140001770
mov ecx, 2
call qword [fcn.140002cf0]
mov r8, rdi
lea rdx, str.Invalid_command_line:__s_n
mov rcx, rax
call sub.msvcrt.dll_fwprintf
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop dword [rax]

Function at 0x140001a00
Capabilities:
Terminate process

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov esi, r8d
mov rbx, rcx
mov r13, rdx
call sub.msvcrt.dll_wcscpy
test esi, esi
js 0x140001a5f
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x140001b1f
call fcn.1400017e0
test eax, eax
jne 0x140001a49
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rcx, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
jmp fcn.1400019a0
mov rbp, qword [sym.imp.msvcrt.dll__waccess]
mov r14, qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov edi, 0xfffffffc
lea r12, [0x14004a040]
jmp 0x140001ae2
mov r8d, 0x1000
mov rdx, r12
mov rcx, rbx
movsxd rsi, esi
call fcn.140001430
xor edx, edx
mov rcx, rbx
lea rsi, [rbx + rsi*2]
call rbp
cmp eax, 0xffffffff
jne 0x140001b15
xor eax, eax
mov r8d, 0x1000
lea rdx, str.mingw_bin
mov rcx, rbx
mov word [rsi], ax
call fcn.140001430
xor edx, edx
mov rcx, rbx
call rbp
xor edx, edx
mov word [rsi], dx
cmp eax, 0xffffffff
jne 0x140001a3a
add edi, 1
je 0x140001b47
mov rcx, rbx
call r14
test eax, eax
je 0x140001b1f
mov rcx, rbx
call sub.msvcrt.dll_wcslen
mov rsi, rax
call fcn.1400017e0
test eax, eax
je 0x140001a80
mov rcx, rbx
call fcn.1400019a0
test eax, eax
je 0x140001a80
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov word [rsi], 0
jmp 0x140001a3a
mov ecx, 2
call qword [fcn.140002cf0]
mov r8, r13
lea rdx, str.Invalid_executable_path:__s_n
mov rcx, rax
call sub.msvcrt.dll_fwprintf
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, 2
call qword [fcn.140002cf0]
mov r8, r13
lea rdx, str.Top_level_not_found:__s_n
mov rcx, rax
call sub.msvcrt.dll_fwprintf
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop
Function at 0x140001e50
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 fcn.140002cf0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.140002cf0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140001ec0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14004a124]
mov rbx, rcx
test esi, esi
jle 0x140001ff0
mov rax, qword [0x14004a128]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001f0b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001f95
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001ef0
mov rcx, rbx
call fcn.140002980
mov rdi, rax
test rax, rax
je 0x140002012
mov rax, qword [0x14004a128]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140002ac0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14004a128]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001ff7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140001f8e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140001fa0
add dword [0x14004a124], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x14004a128]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001f8e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140001e50
nop dword [rax]
xor esi, esi
jmp 0x140001f18
mov rax, qword [0x14004a128]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140001e50
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140001e50
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400025c0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14004a180]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14004a160]
test rbx, rbx
je 0x140002624
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop word cs:[rax + rax]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x14000261b
test eax, eax
jne 0x14000261b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002600
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]