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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push esi
push edi
push str.ctunnel.exe
call fcn.10016360
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x10010719
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x10010719
push 0x104
lea eax, [ebp - 0x104]
push eax
push 0
push esi
call dword [sym.imp.PSAPI.DLL_GetModuleFileNameExA]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
lea ebx, [ebx]
mov cl, byte [eax + 0x1001fdd0]
mov byte [ebp + eax - 0x208], cl
inc eax
test cl, cl
jne 0x10010550
push 0x100221f8
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov eax, 0x100221f8
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10010574
lea edi, [ebp - 0x208]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10010586
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0
lea ecx, [ebp - 0x208]
push ecx
call ebx
lea eax, [ebp - 0x208]
dec eax
mov edi, edi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x100105b0
mov edx, dword [str.ctunnel.zip]
mov ecx, dword [0x1001c9b4]
mov dword [eax], edx
mov edx, dword [0x1001c9b8]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
not eax
test al, 0x10
je 0x10010619
lea eax, [ebp - 0x104]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100105f0
sub eax, edx
cmp byte [ebp + eax - 0x104], 0x5c
lea eax, [ebp + eax - 0x104]
je 0x10010619
lea ebx, [ebx]
mov byte [eax], 0
dec eax
cmp byte [eax], 0x5c
jne 0x10010610
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x10010719
lea edx, [ebp - 0x104]
push edx
lea eax, [ebp - 0x208]
push eax
call fcn.1001aaf0
test eax, eax
je 0x10010719
xor eax, eax
jmp 0x10010650
mov cl, byte [eax + 0x1001fdd0]
mov byte [ebp + eax - 0x208], cl
inc eax
test cl, cl
jne 0x10010650
push 0x100221f8
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov eax, 0x100221f8
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10010674
lea edi, [ebp - 0x208]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10010686
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x208]
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x100106a3
mov ecx, dword [str.path_ctunnel.txt]
mov edx, dword [0x1001c9c0]
mov dword [eax], ecx
mov ecx, dword [0x1001c9c4]
mov dword [eax + 4], edx
mov edx, dword [0x1001c9c8]
mov dword [eax + 8], ecx
mov cl, byte [0x1001c9cc]
mov dword [eax + 0xc], edx
lea edx, [ebp - 0x208]
push edx
mov byte [eax + 0x10], cl
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x104]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100106f0
sub eax, edx
lea ecx, [ebp - 0x104]
mov ebx, eax
push ecx
lea eax, [ebp - 0x208]
call fcn.10003f60
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
jmp 0x10010720
mov cl, byte [eax + 0x1001fdd0]
mov byte [ebp + eax - 0x104], cl
inc eax
test cl, cl
jne 0x10010720
push 0x100221f8
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov eax, 0x100221f8
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10010744
lea edi, [ebp - 0x104]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10010756
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0
lea edx, [ebp - 0x104]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call ebx
lea eax, [ebp - 0x104]
dec eax
mov edi, edi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10010780
mov ecx, dword [str.pass.log]
mov edx, dword [0x1001c5c0]
mov dword [eax], ecx
mov cl, byte [0x1001c5c4]
mov dword [eax + 4], edx
lea edx, [ebp - 0x104]
push edx
mov byte [eax + 8], cl
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
pop edi
pop esi
pop ebx
mov eax, ecx
mov esp, ebp
pop ebp
ret