Function at 0x108709d
Capabilities:
Accept command line arguments
Check if file exists
Create directory
Get common file path
Get file attributes
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa4c
mov eax, dword [0x10c671c]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
push ebx
push esi
mov eax, edx
push edi
mov dword [ebp - 0xa40], edx
lea esi, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10870c3
sub eax, esi
sar eax, 1
push 0
pop ebx
mov dword [ebp - 0xa48], eax
mov eax, ebx
je 0x10870f2
cmp word [edx + eax*2], 0x3a
je 0x1087224
inc eax
cmp eax, dword [ebp - 0xa48]
jb 0x10870de
movzx eax, word [edx]
cmp ax, 0x2e
je 0x10876bb
cmp ax, 0x2f
je 0x10876bb
cmp ax, 0x5c
je 0x10876bb
mov edi, 0x104
push edi
lea eax, [ebp - 0x61c]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x61c]
push eax
push ebx
push ebx
push dword [ebp + 0x10]
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push edi
lea eax, [ebp - 0x20c]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x61c]
push eax
call esi
mov eax, dword [ebp + 0x10]
and eax, 0x28
cmp al, 0x28
jne 0x1087199
push edi
lea eax, [ebp - 0xa2c]
push eax
push ebx
push ebx
push 0x102f1f0
call sub.SHELL32.dll_SHGetFolderPathEx
cmp eax, ebx
jl 0x108722f
lea eax, [ebp - 0xa2c]
push eax
call esi
push 0x1030060
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0x80
test eax, eax
jne 0x1087314
call ebx
cmp eax, 2
jne 0x10872fd
push 0x10307e0
push 0x1030150
push 0x18b
push edi
call fcn.0109642f
add esp, 0x10
push 0
push 0x1030060
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x10872e9
cmp byte [ebp + 0x14], 0
je 0x10872c6
lea eax, [ebp - 0xa2c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x108725a
call ebx
mov ebx, eax
lea eax, [ebp - 0x20c]
push eax
call esi
push ebx
push 0x1030788
push edi
jmp 0x10876c6
push edx
push 0x1030080
jmp 0x10876c1
push eax
push 0x1030710
push 0x1030150
push 0x156
push 0x80
call fcn.0109642f
add esp, 0x14
lea eax, [ebp - 0x20c]
push eax
call esi
jmp 0x10876ce
push 0x1030060
lea eax, [ebp - 0xa2c]
push eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
test eax, eax
jne 0x108728c
lea eax, [ebp - 0x20c]
push eax
call esi
push 0x10306dc
push edi
call fcn.0109679c
pop ecx
pop ecx
jmp 0x10876ce
push 0x273e
push 0x1030698
lea eax, [ebp - 0xa2c]
push eax
call dword [sym.imp.SHELL32.dll_SHSetLocalizedName]
mov dword [ebp - 0xa38], eax
test eax, eax
jge 0x10872c6
lea eax, [ebp - 0x20c]
push eax
call esi
push dword [ebp - 0xa38]
push 0x1030638
jmp 0x108721e
push 0x1030060
call esi
test eax, eax
jne 0x1087314
call ebx
push eax
push 0x1030598
push 0x1030150
push 0x1b8
push edi
jmp 0x1087244
call ebx
push eax
push 0x1030528
push 0x1030150
push 0x1af
jmp 0x10872e3
call ebx
push eax
push 0x10304a8
push 0x1030150
push 0x1c2
jmp 0x108723f
mov eax, dword [0x10d1160]
push eax
mov dword [ebp - 0xa3c], eax
call esi
test eax, eax
jne 0x108746a
call ebx
cmp eax, 2
jne 0x1087428
cmp byte [ebp + 0xc], 0
jne 0x108724c
push 0
push dword [ebp - 0xa3c]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x108744f
cmp byte [ebp + 0x14], 0
je 0x108741c
lea eax, [ebp - 0xa2c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x108720b
push dword [ebp - 0xa3c]
lea eax, [ebp - 0xa2c]
push eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
test eax, eax
je 0x1087271
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
test eax, eax
je 0x108741c
lea ecx, [ebp - 0xa44]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0xa38], eax
test eax, eax
je 0x108741c
cmp dword [ebp - 0xa44], 0
jle 0x1087410
push dword [ebp + 0x18]
push dword [eax]
lea eax, [ebp - 0xa2c]
push eax
call dword [sym.imp.SHELL32.dll_SHSetLocalizedName]
mov dword [ebp - 0xa4c], eax
test eax, eax
jge 0x1087410
lea eax, [ebp - 0x20c]
push eax
call esi
push dword [ebp - 0xa4c]
push dword [ebp - 0xa3c]
push 0x1030418
push edi
call fcn.0109679c
add esp, 0x10
push dword [ebp - 0xa38]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x10876ce
push dword [ebp - 0xa38]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0xa3c]
call esi
test eax, eax
jne 0x108746a
call ebx
mov ebx, eax
lea eax, [ebp - 0x20c]
push eax
call esi
push ebx
push dword [ebp - 0xa3c]
push 0x1030398
push edi
call fcn.0109679c
add esp, 0x10
jmp 0x10876ce
call ebx
mov ebx, eax
lea eax, [ebp - 0x20c]
push eax
call esi
push ebx
push dword [ebp - 0xa3c]
push 0x1030318
jmp 0x1087441
mov eax, dword [ebp - 0xa40]
xor ecx, ecx
mov dword [ebp - 0xa3c], eax
mov dword [ebp - 0xa38], ecx
mov dword [ebp - 0xa44], ecx
cmp dword [ebp - 0xa48], ecx
jbe 0x108756c
mov edx, dword [ebp - 0xa40]
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x10874aa
cmp ax, 0x2f
jne 0x1087553
mov eax, dword [ebp - 0xa3c]
sub eax, edx
sar eax, 1
sub ecx, eax
push ecx
push dword [ebp - 0xa3c]
lea eax, [ebp - 0x414]
push 0x104
push eax
call sub.msvcrt.dll_wcsncpy_s
add esp, 0x10
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1087526
cmp byte [ebp + 0xc], 0
jne 0x108762e
call ebx
cmp eax, 2
jne 0x108752e
push 0
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x108752e
call ebx
mov ebx, eax
lea eax, [ebp - 0x20c]
push eax
call esi
push ebx
lea eax, [ebp - 0x414]
push eax
push 0x10302b8
jmp 0x1087441
test al, 0x10
je 0x1087639
inc dword [ebp - 0xa38]
lea eax, [ebp - 0x414]
push eax
call esi
mov eax, dword [ebp - 0xa3c]
mov ecx, dword [ebp - 0xa44]
lea eax, [eax + ecx*2 + 2]
mov dword [ebp - 0xa3c], eax
mov ecx, dword [ebp - 0xa44]
inc ecx
mov dword [ebp - 0xa44], ecx
cmp ecx, dword [ebp - 0xa48]
jb 0x1087490
mov eax, dword [ebp - 0xa38]
test eax, eax
jbe 0x108758b
mov dword [ebp - 0xa38], eax
push 0x10302ac
call esi
dec dword [ebp - 0xa38]
jne 0x108757c
push dword [ebp - 0xa40]
lea eax, [ebp - 0x824]
push 0x104
push eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
cmp byte [ebp + 0xc], 0
jne 0x10875c4
push 0x10301cc
lea eax, [ebp - 0x824]
push 0x104
push eax
call sub.msvcrt.dll_wcscat_s
add esp, 0xc
xor eax, eax
xor ecx, ecx
cmp byte [ebp + 0xc], cl
push eax
setne cl
push edi
inc ecx
inc ecx
cmp byte [ebp + 0xc], al
push ecx
push eax
push eax
setne al
dec eax
and eax, 0x40000000
or eax, 0x80000000
push eax
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xa38], eax
cmp eax, 0xffffffff
jne 0x1087659
cmp byte [ebp + 0xc], 0
je 0x1087610
call ebx
cmp eax, 2
je 0x108724c
call ebx
mov ebx, eax
lea eax, [ebp - 0x20c]
push eax
call esi
push ebx
push dword [ebp - 0xa40]
push 0x1030260
jmp 0x1087441
lea eax, [ebp - 0x414]
jmp 0x1087252
lea eax, [ebp - 0x20c]
push eax
call esi
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0xa40]
push 0x10301d8
jmp 0x1087441
lea eax, [ebp - 0x20c]
push eax
call esi
cmp byte [ebp + 0xc], 0
jne 0x10876b3
push dword [ebp - 0xa40]
lea eax, [ebp - 0xa2c]
push 0x104
push eax
call sub.msvcrt.dll_wcscpy_s
mov eax, dword [ebp - 0xa38]
mov dword [ebp - 0xa34], eax
mov eax, dword [ebp + 0x10]
sub esp, 0x204
mov edi, esp
mov dword [ebp - 0xa30], eax
mov ecx, 0x84
lea esi, [ebp - 0xa34]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x10c685c
call fcn.01086d27
mov eax, dword [ebp - 0xa38]
jmp 0x10876d1
push edx
push 0x102fff8
push 0x80
call fcn.0109679c
add esp, 0xc
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0107591b
leave
ret 0x14