Function at 0x10018130
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.1001f4d0
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
test eax, eax
je 0x100183a8
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x100183a8
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 0x100181a4
test byte [ebp - 4], 2
jne 0x100181a4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x100181b0
mov cl, byte [eax + 0x10055868]
mov byte [ebp + eax - 0x108], cl
inc eax
test cl, cl
jne 0x100181b0
push 0x10058858
call ebx
mov eax, 0x10058858
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100181d0
lea edi, [ebp - 0x108]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100181e2
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 0x10018231
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
je 0x1001822a
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 0x10018238
mov ecx, dword [str.ctunnel.zip]
mov edx, dword [0x10048b7c]
mov dword [eax], ecx
mov ecx, dword [0x10048b80]
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 0x10018299
lea eax, [ebp - 0x20c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10018276
sub eax, edx
cmp byte [ebp + eax - 0x20c], 0x5c
lea eax, [ebp + eax - 0x20c]
je 0x10018299
mov byte [eax], 0
dec eax
cmp byte [eax], 0x5c
jne 0x10018290
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x100183a8
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x108]
push edx
call fcn.10024550
test eax, eax
je 0x100183a8
xor eax, eax
jmp 0x100182d0
mov cl, byte [eax + 0x10055868]
mov byte [ebp + eax - 0x108], cl
inc eax
test cl, cl
jne 0x100182d0
push 0x10058858
call ebx
mov eax, 0x10058858
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100182f0
lea edi, [ebp - 0x108]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10018302
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 0x10018320
mov ecx, dword [str.path_ctunnel.txt]
mov edx, dword [0x10048b88]
mov dword [eax], ecx
mov ecx, dword [0x10048b8c]
mov dword [eax + 4], edx
mov edx, dword [0x10048b90]
mov dword [eax + 8], ecx
mov cl, byte [0x10048b94]
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 0x10018380
sub eax, edx
push eax
lea ecx, [ebp - 0x20c]
push ecx
lea eax, [ebp - 0x108]
call fcn.10006ff0
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 + 0x10055868]
mov byte [ebp + eax - 0x20c], cl
inc eax
test cl, cl
jne 0x100183b0
push 0x10058858
call ebx
mov eax, 0x10058858
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100183d0
lea edi, [ebp - 0x20c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100183e2
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 0x10018400
mov edx, dword [str.pass.log]
mov ecx, dword [0x1004879c]
mov dword [eax], edx
mov dl, byte [0x100487a0]
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