Function at 0x1001c900
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.10024800
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
test eax, eax
je 0x1001cb78
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x1001cb78
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 0x1001c974
test byte [ebp - 4], 2
jne 0x1001c974
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1001c980
mov cl, byte [eax + 0x10059d68]
mov byte [ebp + eax - 0x108], cl
inc eax
test cl, cl
jne 0x1001c980
push 0x1005c260
call ebx
mov eax, 0x1005c260
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001c9a0
lea edi, [ebp - 0x108]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001c9b2
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 0x1001ca01
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
je 0x1001c9fa
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 0x1001ca08
mov ecx, dword [str.ctunnel.zip]
mov edx, dword [0x1004a080]
mov dword [eax], ecx
mov ecx, dword [0x1004a084]
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 0x1001ca69
lea eax, [ebp - 0x20c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001ca46
sub eax, edx
cmp byte [ebp + eax - 0x20c], 0x5c
lea eax, [ebp + eax - 0x20c]
je 0x1001ca69
mov byte [eax], 0
dec eax
cmp byte [eax], 0x5c
jne 0x1001ca60
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x1001cb78
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x108]
push edx
call fcn.10029680
test eax, eax
je 0x1001cb78
xor eax, eax
jmp 0x1001caa0
mov cl, byte [eax + 0x10059d68]
mov byte [ebp + eax - 0x108], cl
inc eax
test cl, cl
jne 0x1001caa0
push 0x1005c260
call ebx
mov eax, 0x1005c260
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001cac0
lea edi, [ebp - 0x108]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001cad2
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 0x1001caf0
mov ecx, dword [str.path_ctunnel.txt]
mov edx, dword [0x1004a08c]
mov dword [eax], ecx
mov ecx, dword [0x1004a090]
mov dword [eax + 4], edx
mov edx, dword [0x1004a094]
mov dword [eax + 8], ecx
mov cl, byte [0x1004a098]
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 0x1001cb50
sub eax, edx
push eax
lea ecx, [ebp - 0x20c]
push ecx
lea eax, [ebp - 0x108]
call fcn.10007140
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 + 0x10059d68]
mov byte [ebp + eax - 0x20c], cl
inc eax
test cl, cl
jne 0x1001cb80
push 0x1005c260
call ebx
mov eax, 0x1005c260
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001cba0
lea edi, [ebp - 0x20c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001cbb2
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 0x1001cbd0
mov edx, dword [str.pass.log]
mov ecx, dword [0x10049c80]
mov dword [eax], edx
mov dl, byte [0x10049c84]
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