Function at 0x1001b810
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
push ebx
push esi
push edi
push str.ctunnel.exe
call fcn.10023170
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
test eax, eax
je 0x1001ba88
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x1001ba88
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0
push esi
call dword [sym.imp.PSAPI.DLL_GetModuleFileNameExA]
lea ecx, [ebp - 4]
push ecx
push esi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x1001b884
test byte [ebp - 4], 2
jne 0x1001b884
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1001b890
mov cl, byte [eax + 0x10057a88]
mov byte [ebp + eax - 0x108], cl
inc eax
test cl, cl
jne 0x1001b890
push 0x10059f80
call ebx
mov eax, 0x10059f80
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001b8b0
lea edi, [ebp - 0x108]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001b8c2
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0
lea edx, [ebp - 0x108]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x1001b911
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
je 0x1001b90a
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.SHLWAPI.dll_PathMakeSystemFolderA]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0x108]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x1001b918
mov ecx, dword [str.ctunnel.zip]
mov edx, dword [0x10048060]
mov dword [eax], ecx
mov ecx, dword [0x10048064]
mov dword [eax + 4], edx
lea edx, [ebp - 0x20c]
push edx
mov dword [eax + 8], ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
not eax
test al, 0x10
je 0x1001b979
lea eax, [ebp - 0x20c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001b956
sub eax, edx
cmp byte [ebp + eax - 0x20c], 0x5c
lea eax, [ebp + eax - 0x20c]
je 0x1001b979
mov byte [eax], 0
dec eax
cmp byte [eax], 0x5c
jne 0x1001b970
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x1001ba88
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x108]
push edx
call fcn.10027f00
test eax, eax
je 0x1001ba88
xor eax, eax
jmp 0x1001b9b0
mov cl, byte [eax + 0x10057a88]
mov byte [ebp + eax - 0x108], cl
inc eax
test cl, cl
jne 0x1001b9b0
push 0x10059f80
call ebx
mov eax, 0x10059f80
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001b9d0
lea edi, [ebp - 0x108]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001b9e2
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x108]
rep movsb byte es:[edi], byte [esi]
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x1001ba00
mov ecx, dword [str.path_ctunnel.txt]
mov edx, dword [0x1004806c]
mov dword [eax], ecx
mov ecx, dword [0x10048070]
mov dword [eax + 4], edx
mov edx, dword [0x10048074]
mov dword [eax + 8], ecx
mov cl, byte [0x10048078]
mov dword [eax + 0xc], edx
push 0
lea edx, [ebp - 0x108]
push edx
mov byte [eax + 0x10], cl
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x20c]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001ba60
sub eax, edx
push eax
lea ecx, [ebp - 0x20c]
push ecx
lea eax, [ebp - 0x108]
call fcn.100064d0
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
lea ebx, [ebx]
mov cl, byte [eax + 0x10057a88]
mov byte [ebp + eax - 0x20c], cl
inc eax
test cl, cl
jne 0x1001ba90
push 0x10059f80
call ebx
mov eax, 0x10059f80
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001bab0
lea edi, [ebp - 0x20c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001bac2
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x20c]
rep movsb byte es:[edi], byte [esi]
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x1001bae0
mov edx, dword [str.pass.log]
mov ecx, dword [0x10047c64]
mov dword [eax], edx
mov dl, byte [0x10047c68]
mov dword [eax + 4], ecx
mov byte [eax + 8], dl
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret