Function at 0x1001b080
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.10023f80
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
test eax, eax
je 0x1001b2f8
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x1001b2f8
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 0x1001b0f4
test byte [ebp - 4], 2
jne 0x1001b0f4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1001b100
mov cl, byte [eax + 0x1005ae00]
mov byte [ebp + eax - 0x108], cl
inc eax
test cl, cl
jne 0x1001b100
push 0x1005d350
call ebx
mov eax, 0x1005d350
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001b120
lea edi, [ebp - 0x108]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001b132
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 0x1001b181
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
je 0x1001b17a
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 0x1001b188
mov ecx, dword [str.ctunnel.zip]
mov edx, dword [0x1004a4f8]
mov dword [eax], ecx
mov ecx, dword [0x1004a4fc]
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 0x1001b1e9
lea eax, [ebp - 0x20c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001b1c6
sub eax, edx
cmp byte [ebp + eax - 0x20c], 0x5c
lea eax, [ebp + eax - 0x20c]
je 0x1001b1e9
mov byte [eax], 0
dec eax
cmp byte [eax], 0x5c
jne 0x1001b1e0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x1001b2f8
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x108]
push edx
call fcn.10028fe0
test eax, eax
je 0x1001b2f8
xor eax, eax
jmp 0x1001b220
mov cl, byte [eax + 0x1005ae00]
mov byte [ebp + eax - 0x108], cl
inc eax
test cl, cl
jne 0x1001b220
push 0x1005d350
call ebx
mov eax, 0x1005d350
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001b240
lea edi, [ebp - 0x108]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001b252
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 0x1001b270
mov ecx, dword [str.path_ctunnel.txt]
mov edx, dword [0x1004a504]
mov dword [eax], ecx
mov ecx, dword [0x1004a508]
mov dword [eax + 4], edx
mov edx, dword [0x1004a50c]
mov dword [eax + 8], ecx
mov cl, byte [0x1004a510]
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 0x1001b2d0
sub eax, edx
push eax
lea ecx, [ebp - 0x20c]
push ecx
lea eax, [ebp - 0x108]
call fcn.10005550
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 + 0x1005ae00]
mov byte [ebp + eax - 0x20c], cl
inc eax
test cl, cl
jne 0x1001b300
push 0x1005d350
call ebx
mov eax, 0x1005d350
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001b320
lea edi, [ebp - 0x20c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001b332
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 0x1001b350
mov edx, dword [str.pass.log]
mov ecx, dword [0x1004a0f8]
mov dword [eax], edx
mov dl, byte [0x1004a0fc]
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