Function at 0x100161c0
Capabilities:
Check if file exists
Copy file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101e3e4a
mov eax, dword fs:[0]
push eax
sub esp, 0x308
mov eax, dword [0x102683e0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov edi, ecx
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x30c], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1001620b
test al, 0x10
jne 0x1001621a
mov ecx, ebx
call fcn.100142b0
test eax, eax
je 0x10016aeb
xor eax, eax
mov dword [ebp - 0x74], 7
mov dword [ebp - 0x78], 0
mov word [ebp - 0x88], ax
cmp word [edi], ax
jne 0x1001623a
xor ecx, ecx
jmp 0x1001624f
mov ecx, edi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10016240
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x88]
call fcn.10003c10
push 1
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x88]
mov esi, dword [ebp - 0x78]
push esi
push 0x102285e4
call fcn.1001d650
lea ecx, [esi - 1]
cmp eax, ecx
je 0x100162ec
push 0x102285e4
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.10004650
mov esi, eax
add esp, 0xc
lea eax, [ebp - 0x88]
cmp eax, esi
je 0x100162db
cmp dword [ebp - 0x74], 8
jb 0x100162b8
push dword [ebp - 0x88]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x74], 7
push esi
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x78], 0
mov word [ebp - 0x88], ax
call fcn.10003640
cmp dword [ebp - 0x2c], 8
jb 0x100162ec
push dword [ebp - 0x40]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x5c], 7
mov dword [ebp - 0x60], 0
mov word [ebp - 0x70], ax
cmp word [ebx], ax
jne 0x10016309
xor ecx, ecx
jmp 0x1001631f
mov ecx, ebx
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10016310
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x70]
call fcn.10003c10
push 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x70]
mov esi, dword [ebp - 0x60]
push esi
push 0x102285e4
call fcn.1001d650
lea ecx, [esi - 1]
cmp eax, ecx
je 0x100163a4
push 0x102285e4
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.10004650
mov esi, eax
add esp, 0xc
lea eax, [ebp - 0x70]
cmp eax, esi
je 0x10016393
cmp dword [ebp - 0x5c], 8
jb 0x10016376
push dword [ebp - 0x70]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x5c], 7
push esi
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x60], 0
mov word [ebp - 0x70], ax
call fcn.10003640
cmp dword [ebp - 0x2c], 8
jb 0x100163a4
push dword [ebp - 0x40]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], eax
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 3
mov dword [ebp - 0x8c], 7
mov dword [ebp - 0x90], eax
mov word [ebp - 0xa0], ax
cmp word [edi], ax
jne 0x100163ea
xor ecx, ecx
jmp 0x100163ff
mov ecx, edi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100163f0
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0xa0]
call fcn.10003c10
push 0x1022a95c
lea eax, [ebp - 0xa0]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.10004650
mov esi, eax
add esp, 0xc
lea eax, [ebp - 0xa0]
cmp eax, esi
je 0x10016474
cmp dword [ebp - 0x8c], 8
jb 0x1001644b
push dword [ebp - 0xa0]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x8c], 7
push esi
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x90], 0
mov word [ebp - 0xa0], ax
call fcn.10003640
cmp dword [ebp - 0x2c], 8
jb 0x10016485
push dword [ebp - 0x40]
call fcn.101a02f0
add esp, 4
cmp dword [ebp - 0x8c], 8
lea ecx, [ebp - 0x308]
lea eax, [ebp - 0xa0]
cmovae eax, dword [ebp - 0xa0]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
mov dword [ebp - 0x310], edi
cmp edi, 0xffffffff
je 0x10016a2f
test byte [ebp - 0x308], 0x10
lea eax, [ebp - 0x2dc]
je 0x1001662c
mov ecx, 0x102285f0
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100164f6
test dx, dx
je 0x100164f2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100164f6
add eax, 4
add ecx, 4
test dx, dx
jne 0x100164d0
xor eax, eax
jmp 0x100164fb
sbb eax, eax
or eax, 1
test eax, eax
je 0x10016733
mov ecx, 0x102285f4
lea eax, [ebp - 0x2dc]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10016536
test dx, dx
je 0x10016532
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10016536
add eax, 4
add ecx, 4
test dx, dx
jne 0x10016510
xor eax, eax
jmp 0x1001653b
sbb eax, eax
or eax, 1
mov ebx, dword [ebp - 0x30c]
test eax, eax
je 0x10016739
test ebx, ebx
je 0x100165b8
mov esi, dword [ebx]
lea edx, [ebp - 0x2dc]
mov byte [ebp - 0x30c], 0
lea ecx, [ebp - 0x30c]
push dword [ebp - 0x30c]
push esi
push dword [esi]
call fcn.10020420
add esp, 0xc
cmp dword [ebp - 0x30c], esi
je 0x100165b8
lea eax, [ebp - 0x2dc]
push eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.10004650
mov esi, eax
lea eax, [ebp - 0x2dc]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0xb8]
push eax
call fcn.10004650
add esp, 0x18
mov byte [ebp - 4], 6
jmp 0x100165f3
lea eax, [ebp - 0x2dc]
push eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.10004650
mov esi, eax
lea eax, [ebp - 0x2dc]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0xb8]
push eax
call fcn.10004650
add esp, 0x18
mov byte [ebp - 4], 8
cmp dword [esi + 0x14], 8
jb 0x100165fb
mov esi, dword [esi]
cmp dword [eax + 0x14], 8
jb 0x10016603
mov eax, dword [eax]
push ebx
mov edx, esi
mov ecx, eax
call fcn.100161c0
add esp, 4
lea ecx, [ebp - 0xb8]
call fcn.100032a0
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 4
call fcn.100032a0
jmp 0x10016739
push eax
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.10004650
mov esi, eax
add esp, 0xc
lea eax, [ebp - 0x58]
cmp eax, esi
je 0x10016677
cmp dword [ebp - 0x44], 8
jb 0x1001665a
push dword [ebp - 0x58]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x44], 7
push esi
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
call fcn.10003640
cmp dword [ebp - 0x2c], 8
jb 0x10016688
push dword [ebp - 0x40]
call fcn.101a02f0
add esp, 4
lea eax, [ebp - 0x2dc]
push eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.10004650
mov esi, eax
add esp, 0xc
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x100166d6
cmp dword [ebp - 0x14], 8
jb 0x100166b9
push dword [ebp - 0x28]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.10003640
cmp dword [ebp - 0x2c], 8
jb 0x100166e7
push dword [ebp - 0x40]
call fcn.101a02f0
add esp, 4
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x10016713
and eax, 0xfffffffe
lea ecx, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
push eax
cmovae ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
push 0
cmovae ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x58]
cmp dword [ebp - 0x44], 8
push ecx
cmovae eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ebx, dword [ebp - 0x30c]
lea eax, [ebp - 0x308]
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
call edi
test eax, eax
je 0x10016a23
test byte [ebp - 0x308], 0x10
lea eax, [ebp - 0x2dc]
je 0x100168f3
mov ecx, 0x102285f0
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10016796
test dx, dx
je 0x10016792
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10016796
add eax, 4
add ecx, 4
test dx, dx
jne 0x10016770
xor eax, eax
jmp 0x1001679b
sbb eax, eax
or eax, 1
test eax, eax
je 0x10016a0c
mov ecx, 0x102285f4
lea eax, [ebp - 0x2dc]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100167d6
test dx, dx
je 0x100167d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100167d6
add eax, 4
add ecx, 4
test dx, dx
jne 0x100167b0
xor eax, eax
jmp 0x100167db
sbb eax, eax
or eax, 1
test eax, eax
je 0x10016a0c
test ebx, ebx
je 0x10016852
mov esi, dword [ebx]
lea edx, [ebp - 0x2dc]
mov byte [ebp - 0x30c], 0
lea ecx, [ebp - 0x314]
push dword [ebp - 0x30c]
push esi
push dword [esi]
call fcn.10020420
add esp, 0xc
cmp dword [ebp - 0x314], esi
je 0x10016852
lea eax, [ebp - 0x2dc]
push eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xb8]
push eax
call fcn.10004650
mov esi, eax
lea eax, [ebp - 0x2dc]
mov byte [ebp - 4], 9
push eax
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.10004650
add esp, 0x18
mov byte [ebp - 4], 0xa
jmp 0x1001688d
lea eax, [ebp - 0x2dc]
push eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xb8]
push eax
call fcn.10004650
mov esi, eax
lea eax, [ebp - 0x2dc]
mov byte [ebp - 4], 0xb
push eax
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.10004650
add esp, 0x18
mov byte [ebp - 4], 0xc
cmp dword [esi + 0x14], 8
jb 0x10016895
mov esi, dword [esi]
cmp dword [eax + 0x14], 8
jb 0x1001689d
mov eax, dword [eax]
push ebx
mov edx, esi
mov ecx, eax
call fcn.100161c0
add esp, 4
cmp dword [ebp - 0x2c], 8
jb 0x100168bb
push dword [ebp - 0x40]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov byte [ebp - 4], 4
cmp dword [ebp - 0xa4], 8
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x10016a0c
push dword [ebp - 0xb8]
call fcn.101a02f0
add esp, 4
jmp 0x10016a0c
push eax
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0xb8]
push eax
call fcn.10004650
mov esi, eax
add esp, 0xc
lea eax, [ebp - 0x58]
cmp eax, esi
je 0x10016941
cmp dword [ebp - 0x44], 8
jb 0x10016924
push dword [ebp - 0x58]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x44], 7
push esi
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
call fcn.10003640
cmp dword [ebp - 0xa4], 8
jb 0x10016958
push dword [ebp - 0xb8]
call fcn.101a02f0
add esp, 4
lea eax, [ebp - 0x2dc]
push eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xb8]
push eax
call fcn.10004650
mov esi, eax
add esp, 0xc
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x100169a9
cmp dword [ebp - 0x14], 8
jb 0x1001698c
push dword [ebp - 0x28]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.10003640
cmp dword [ebp - 0xa4], 8
jb 0x100169c0
push dword [ebp - 0xb8]
call fcn.101a02f0
add esp, 4
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x100169ec
and eax, 0xfffffffe
lea ecx, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
push eax
cmovae ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
push 0
cmovae ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x58]
cmp dword [ebp - 0x44], 8
push ecx
cmovae eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [ebp - 0x308]
push eax
push dword [ebp - 0x310]
call edi
test eax, eax
jne 0x10016751
push dword [ebp - 0x310]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x8c], 8
jb 0x10016a46
push dword [ebp - 0xa0]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x8c], 7
cmp dword [ebp - 0x14], 8
mov dword [ebp - 0x90], 0
mov word [ebp - 0xa0], ax
jb 0x10016a74
push dword [ebp - 0x28]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
cmp dword [ebp - 0x44], 8
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
jb 0x10016a99
push dword [ebp - 0x58]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x44], 7
cmp dword [ebp - 0x5c], 8
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
jb 0x10016abe
push dword [ebp - 0x70]
call fcn.101a02f0
add esp, 4
xor eax, eax
mov dword [ebp - 0x5c], 7
cmp dword [ebp - 0x74], 8
mov dword [ebp - 0x60], 0
mov word [ebp - 0x70], ax
jb 0x10016ae6
push dword [ebp - 0x88]
call fcn.101a02f0
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.101a0193
mov esp, ebp
pop ebp
ret