Function at 0x140055150
Capabilities:
Enumerate files on windows
Get common file path
Set current directory

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x520
mov qword [rsp + 0x98], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x14026fdb0]
xor rax, rsp
mov qword [rsp + 0x510], rax
mov rbx, rdx
mov r15, rcx
lea rcx, [rsp + 0x40]
call fcn.1400054e0
nop
call fcn.140056384
mov rcx, rax
xor r13d, r13d
mov edx, r13d
test rax, rax
setne dl
test edx, edx
jne 0x1400551bd
mov ecx, 0x80004005
call fcn.140004550
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x38], rax
call fcn.140056384
mov rdx, rax
mov ecx, r13d
test rax, rax
setne cl
test ecx, ecx
jne 0x1400551ec
mov ecx, 0x80004005
call fcn.140004550
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x300]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov r8d, 1
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call fcn.140012140
xor edx, edx
lea rdi, [0x14021d21c]
mov rsi, qword [rax]
mov ecx, 2
repe cmpsw word [rsi], word [rdi]
je 0x140055241
sbb edx, edx
sbb edx, 0xffffffff
test edx, edx
setne dil
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
or r14, 0xffffffffffffffff
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14005526b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test dil, dil
je 0x140055287
mov r8d, 1
lea rdx, [0x14021d21c]
lea rcx, [rsp + 0x40]
call fcn.14000bed0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x1400552fe
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400552b5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400552d6
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov ecx, r14d
lock xadd dword [rdx + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x1400552f6
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, r14d
jmp 0x140055798
mov qword [rsp + 0xb0], 0x927
mov qword [rsp + 0xb8], r13
mov qword [rsp + 0xc0], r13
mov dword [rsp + 0xc8], r13d
mov dword [rsp + 0xcc], 0xffffffff
mov qword [rsp + 0xd0], r13
mov dword [rsp + 0xd8], r13d
lea rdx, [rsp + 0xb0]
lea rcx, str.oem.inf
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r12, rax
mov qword [rsp + 0x48], rax
mov ebx, r13d
cmp rax, 0xffffffffffffffff
setne bl
lea rcx, [r15 + 0x58]
mov r8, r14
xor edx, edx
call fcn.140058c34
lea rcx, [r15 + 0x30]
mov r8, r14
xor edx, edx
call fcn.14007c2a8
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x30]
nop word [rax + rax]
test ebx, ebx
je 0x14005570c
lea r8, [rsp + 0xdc]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x68]
call fcn.140012330
nop
mov r13, qword [rax]
lea rcx, [r13 - 0x18]
lea rdi, [rsi - 0x18]
cmp rcx, rdi
je 0x140055501
cmp dword [rdi + 0x10], 0
jl 0x1400553fd
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x1400553fd
call fcn.140006db0
mov rsi, rax
mov ecx, r14d
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x1400553f4
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rsi + 0x18]
jmp 0x1400554fc
movsxd rbx, dword [r13 - 0x10]
test ebx, ebx
jne 0x140055464
mov rbx, qword [rdi]
cmp dword [rdi + 8], 0
je 0x140055501
cmp dword [rdi + 0x10], 0
jge 0x140055438
cmp dword [rsi - 0xc], 0
jge 0x140055428
mov ecx, 0x80070057
call fcn.140004550
xor r13d, r13d
mov dword [rsi - 0x10], r13d
mov word [rsi], r13w
jmp 0x140055504
mov eax, r14d
lock xadd dword [rdi + 0x10], eax
dec eax
test eax, eax
jg 0x140055452
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x18]
add rax, 0x18
jmp 0x1400554fc
test r13, r13
jne 0x140055473
mov ecx, 0x80070057
call fcn.140004550
mov eax, dword [rsi - 0x10]
mov dword [rsp + 0x50], eax
mov r12, r13
sub r12, rsi
sar r12, 1
test ebx, ebx
jns 0x140055491
mov ecx, 0x80070057
call fcn.140004550
mov ecx, 1
sub ecx, dword [rdi + 0x10]
mov eax, dword [rdi + 0xc]
sub eax, ebx
or eax, ecx
jge 0x1400554b3
mov edx, ebx
lea rcx, [rsp + 0x38]
call fcn.140005ae0
mov rsi, qword [rsp + 0x38]
mov eax, dword [rsp + 0x50]
lea rdi, [rbx + rbx]
movsxd rdx, dword [rsi - 0xc]
mov rcx, rsi
mov r9, rdi
add rdx, rdx
cmp r12, rax
ja 0x1400554d8
lea r8, [rsi + r12*2]
call fcn.140199418
jmp 0x1400554e0
mov r8, r13
call fcn.140199918
cmp ebx, dword [rsi - 0xc]
jg 0x1400554f2
mov dword [rsi - 0x10], ebx
xor r13d, r13d
mov word [rdi + rsi], r13w
jmp 0x140055504
mov ecx, 0x80070057
call fcn.140004550
mov qword [rsp + 0x38], rax
xor r13d, r13d
mov rdx, qword [rsp + 0x68]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140055524
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rcx, r14
lea rdi, [rsp + 0xdc]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rsi, rcx
mov rdi, qword [rsp + 0x30]
test ecx, ecx
jne 0x1400555a5
lea rdx, [rdi - 0x18]
mov rsi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140055629
cmp dword [rdx + 0x10], eax
jge 0x140055577
cmp dword [rdi - 0xc], eax
jge 0x14005556a
mov ecx, 0x80070057
call fcn.140004550
mov dword [rdi - 0x10], r13d
mov word [rdi], r13w
jmp 0x140055629
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14005558e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x30], rdi
jmp 0x140055629
mov r12d, dword [rdi - 0x10]
lea rbx, [rsp + 0xdc]
sub rbx, rdi
sar rbx, 1
test ecx, ecx
jns 0x1400555c5
mov ecx, 0x80070057
call fcn.140004550
mov ecx, 1
sub ecx, dword [rdi - 8]
mov eax, dword [rdi - 0xc]
sub eax, esi
or eax, ecx
jge 0x1400555e7
mov edx, esi
lea rcx, [rsp + 0x30]
call fcn.140005ae0
mov rdi, qword [rsp + 0x30]
movsxd rax, esi
movsxd rdx, dword [rdi - 0xc]
mov rcx, rdi
add rdx, rdx
cmp rbx, r12
lea r12, [rax + rax]
mov r9, r12
ja 0x14005560b
lea r8, [rdi + rbx*2]
call fcn.140199418
jmp 0x140055618
lea r8, [rsp + 0xdc]
call fcn.140199918
cmp esi, dword [rdi - 0xc]
jg 0x140055701
mov dword [rdi - 0x10], esi
mov word [r12 + rdi], r13w
mov rsi, qword [rsp + 0x38]
mov rdx, rsi
mov rcx, r15
call fcn.140053090
test eax, eax
je 0x1400556e4
mov ecx, 0x328
call fcn.140056010
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140055686
lea rcx, [r15 + 0x28]
lea rdx, [r15 + 0x20]
lea r9, [r15 + 0x18]
lea r8, [r15 + 0x10]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0x30]
mov rcx, rax
call fcn.1400522a0
mov rbx, rax
mov rdi, qword [rsp + 0x30]
jmp 0x140055689
mov rbx, r13
lea rax, [r15 + 0x380]
lea rcx, [r15 + 0x358]
lea r9, [r15 + 0x330]
lea r8, [r15 + 0x308]
lea rdx, [r15 + 0x2e0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov rcx, rbx
call fcn.1400526c0
lea rcx, [r15 + 0x30]
mov r8, rbx
mov rdx, qword [rcx + 0x10]
call fcn.14007c44c
lea rcx, [r15 + 0x58]
lea r8, [rsp + 0xdc]
mov rdx, qword [rcx + 0x10]
call fcn.14005920c
nop
lea rdx, [rsp + 0xb0]
mov r12, qword [rsp + 0x48]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ebx, eax
jmp 0x140055390
mov ecx, 0x80070057
call fcn.140004550
nop
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rcx, [rsp + 0x300]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x140055735
lea rcx, [rsp + 0x300]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rsi, qword [r15 + 0x68]
lea rdx, [rdi - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140055755
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140055776
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r14d
dec r14d
test r14d, r14d
jg 0x140055796
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, esi
mov rcx, qword [rsp + 0x510]
xor rcx, rsp
call fcn.140198b40
lea r11, [rsp + 0x520]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret