Function at 0x1001ce10
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.10024bf0
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
test eax, eax
je 0x1001d088
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x1001d088
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 0x1001ce84
test byte [ebp - 4], 2
jne 0x1001ce84
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1001ce90
mov cl, byte [eax + 0x10059d68]
mov byte [ebp + eax - 0x108], cl
inc eax
test cl, cl
jne 0x1001ce90
push 0x1005c260
call ebx
mov eax, 0x1005c260
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001ceb0
lea edi, [ebp - 0x108]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001cec2
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 0x1001cf11
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
je 0x1001cf0a
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 0x1001cf18
mov ecx, dword [str.ctunnel.zip]
mov edx, dword [0x1004a0d0]
mov dword [eax], ecx
mov ecx, dword [0x1004a0d4]
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 0x1001cf79
lea eax, [ebp - 0x20c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001cf56
sub eax, edx
cmp byte [ebp + eax - 0x20c], 0x5c
lea eax, [ebp + eax - 0x20c]
je 0x1001cf79
mov byte [eax], 0
dec eax
cmp byte [eax], 0x5c
jne 0x1001cf70
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x1001d088
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x108]
push edx
call fcn.10029b30
test eax, eax
je 0x1001d088
xor eax, eax
jmp 0x1001cfb0
mov cl, byte [eax + 0x10059d68]
mov byte [ebp + eax - 0x108], cl
inc eax
test cl, cl
jne 0x1001cfb0
push 0x1005c260
call ebx
mov eax, 0x1005c260
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001cfd0
lea edi, [ebp - 0x108]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001cfe2
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 0x1001d000
mov ecx, dword [str.path_ctunnel.txt]
mov edx, dword [0x1004a0dc]
mov dword [eax], ecx
mov ecx, dword [0x1004a0e0]
mov dword [eax + 4], edx
mov edx, dword [0x1004a0e4]
mov dword [eax + 8], ecx
mov cl, byte [0x1004a0e8]
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 0x1001d060
sub eax, edx
push eax
lea ecx, [ebp - 0x20c]
push ecx
lea eax, [ebp - 0x108]
call fcn.10007350
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 0x1001d090
push 0x1005c260
call ebx
mov eax, 0x1005c260
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001d0b0
lea edi, [ebp - 0x20c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001d0c2
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 0x1001d0e0
mov edx, dword [str.pass.log]
mov ecx, dword [0x10049cd0]
mov dword [eax], edx
mov dl, byte [0x10049cd4]
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