Function at 0x140006140
Capabilities:
Enumerate files on windows
Query environment variable
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xe0]
sub rsp, 0x1e0
xor r15d, r15d
mov qword [rsp + 0x78], r15
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x70], 7
mov word [rsp + 0x78], r15w
lea r8d, [r15 + 3]
lea rdx, [0x1400012c0]
lea rcx, [rsp + 0x78]
call fcn.140006900
nop
lea rcx, [rsp + 0x78]
call fcn.140005a80
test al, al
je 0x14000664e
lea rcx, [0x1400012c8]
call fcn.140005800
mov ebx, r15d
mov ecx, 0x1000
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
mov r8d, 0x1000
mov rdx, rax
lea rcx, [0x1400012a0]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x48], 0xf
mov byte [rsp + 0x30], bl
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rdi + r8], bl
jne 0x1400061f2
mov rdx, rdi
lea rcx, [rsp + 0x30]
call fcn.140006aa0
nop
mov rcx, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
mov rax, rdx
sub rax, rcx
cmp rax, 2
jb 0x140006247
lea rax, [rcx + 2]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x30]
cmp rdx, 0x10
cmovae rax, qword [rsp + 0x30]
mov edx, 0x2a5c
mov word [rax + rcx], dx
mov byte [rax + rcx + 2], 0
jmp 0x14000625f
mov qword [rsp + 0x20], 2
mov edx, 2
lea rcx, [rsp + 0x30]
call fcn.140007090
lea rcx, [rsp + 0x30]
cmp qword [rsp + 0x48], 0x10
cmovae rcx, qword [rsp + 0x30]
lea rdx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400062ac
nop dword [rax]
nop word [rax + rax]
inc ebx
lea rdx, [rbp - 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x140006290
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov edx, ebx
lea rcx, [0x1400012b0]
call fcn.140005800
nop
mov rdx, qword [rsp + 0x48]
cmp ebx, 0x15e
jge 0x140006308
cmp rdx, 0x10
jb 0x1400062fc
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400062f7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140006337
call fcn.140008c90
lea rcx, [0x1400012d0]
jmp 0x140006655
cmp rdx, 0x10
jb 0x140006343
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000633e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000633e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140008c90
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], 0xf
mov byte [rsp + 0x50], 0
mov r8d, 0x9c0
lea rdx, [0x1400012e0]
lea rcx, [rsp + 0x50]
call fcn.140006aa0
nop
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x30]
call fcn.140007490
nop
lea rdi, [rsp + 0x30]
cmp qword [rsp + 0x48], 0x10
cmovae rdi, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x40]
shr rcx, 1
mov edx, 1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov r12, rax
mov rbx, r15
mov rsi, qword [rsp + 0x40]
test rsi, 0xfffffffffffffffe
jbe 0x1400063ea
nop dword [rax + rax]
lea r8, [rbx + r12]
lea rdx, [0x140001ca4]
mov rcx, rdi
call fcn.140005860
add rdi, 2
inc rbx
mov rsi, qword [rsp + 0x40]
mov rax, rsi
shr rax, 1
cmp rbx, rax
jb 0x1400063c0
shr rsi, 1
call fcn.140008c40
mov rcx, qword [rax + 0x40]
cmp word [rcx + 0x18], 0
je 0x14000640e
nop dword [rax]
mov rax, qword [rax]
mov rcx, qword [rax + 0x40]
cmp word [rcx + 0x18], 0
jne 0x140006400
mov r14, qword [rax + 0x10]
movsxd rax, dword [r14 + 0x3c]
mov ecx, dword [rax + r14 + 0x88]
add rcx, r14
mov r13d, dword [rcx + 0x1c]
add r13, r14
mov edx, dword [rcx + 0x20]
add rdx, r14
mov qword [rbp + 0x138], rdx
mov eax, dword [rcx + 0x24]
add rax, r14
mov qword [rsp + 0x70], rax
mov rbx, r15
mov r15d, dword [rcx + 0x18]
test r15, r15
je 0x140006486
nop dword [rax]
movzx eax, word [rax + rbx*2]
mov edi, dword [r13 + rax*4]
add rdi, r14
mov ecx, dword [rdx + rbx*4]
add rcx, r14
lea rdx, [0x140001268]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x14000648d
inc rbx
cmp rbx, r15
mov rdx, qword [rbp + 0x138]
mov rax, qword [rsp + 0x70]
jb 0x140006450
mov rdi, qword [rbp + 0x130]
lea rdx, [0x140001cb0]
mov rcx, r14
call rdi
mov rbx, rax
lea rdx, [0x140001cc0]
mov rcx, r14
call rdi
lea rdx, [0x140001cd0]
mov rcx, r14
call rdi
mov r14, rax
lea r9, [rbp + 0x130]
mov r8d, 0x40
mov edx, esi
mov rcx, r12
call rbx
lea rcx, [0x140001ce8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
test rax, rax
jne 0x1400064e2
lea ebx, [rax + 1]
jmp 0x1400064fa
lea rdx, [0x140001cc0]
mov rcx, rax
call rdi
test rax, rax
jne 0x140006594
lea ebx, [rax + 3]
mov rdx, qword [rsp + 0x48]
cmp rdx, 0x10
jb 0x140006537
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140006532
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400065ed
call fcn.140008c90
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0xf
mov byte [rsp + 0x30], 0
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x14000665d
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000658a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140006640
call fcn.140008c90
jmp 0x14000665d
xor r15d, r15d
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], r15d
xor r9d, r9d
mov r8, r12
xor edx, edx
xor ecx, ecx
call rax
mov edx, 0xffffffff
mov rcx, rax
call r14
nop
mov rdx, qword [rsp + 0x48]
cmp rdx, 0x10
jb 0x1400065f9
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400065f4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400065f4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140008c90
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x48], 0xf
mov byte [rsp + 0x30], 0
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x14000665a
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140006647
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140006647
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140008c90
jmp 0x14000665a
lea rcx, [0x140001d08]
call fcn.140005800
mov ebx, r15d
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x1400066a1
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000669c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000669c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140008c90
mov eax, ebx
mov rbx, qword [rsp + 0x220]
add rsp, 0x1e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret