Function at 0x4066e9
Capabilities:
Create thread
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov dl, byte [0x4182fc]
push ebx
push esi
push edi
push 0xf
xor eax, eax
pop ecx
lea edi, [ebp - 0x67]
mov byte [ebp - 0x68], dl
push 7
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x1f]
mov byte [ebp - 0x20], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor ebx, ebx
push 0x294
mov esi, 0x418380
push ebx
push esi
stosb byte es:[edi], al
call fcn.0040b6c0
mov eax, dword [ebp + 8]
add esp, 0xc
mov edi, 0x100
mov dword [0x41860c], eax
mov eax, dword [ebp + 0xc]
push edi
push esi
mov dword [0x418610], eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x5c
push esi
call fcn.0040b5f0
pop ecx
test eax, eax
pop ecx
je 0x406769
push 0x5c
push esi
call fcn.0040b5f0
pop ecx
mov byte [eax + 1], bl
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push edi
push ebx
push esi
call fcn.0040b6c0
add esp, 0xc
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push 0x6f
push ebx
push 0x6b
push ebx
push 0x485
push dword [0x419934]
call edi
push eax
push 0x482
push dword [0x419934]
call edi
push eax
call dword [sym.imp.USER32.dll_IsDlgButtonChecked]
cmp eax, 1
push 0xffffffffffffffff
push ebx
jne 0x406826
push 0x596
call fcn.00406e92
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.0040b4f0
push 0xffffffffffffffff
push ebx
push 0x8fe
call fcn.00406e92
add esp, 0x20
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.0040b470
pop ecx
lea eax, [ebp + eax - 0x67]
push eax
call fcn.0040b500
lea eax, [ebp - 0x20]
push 0x4142b0
push eax
call fcn.0040b4f0
lea eax, [ebp - 0x20]
push 0x4142ac
push eax
call fcn.0040b500
add esp, 0x18
lea eax, [ebp - 0x20]
push 0x4142a8
push eax
call fcn.0040b470
pop ecx
lea eax, [ebp + eax - 0x1f]
push eax
call fcn.0040b500
pop ecx
pop ecx
jmp 0x40684b
push 0x8fe
call fcn.00406e92
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.0040b4f0
lea eax, [ebp - 0x20]
push 0x4142a8
push eax
call fcn.0040b4f0
add esp, 0x1c
lea eax, [ebp - 0xa8]
push 0x40
push eax
push 0x589
call fcn.00406e92
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x20]
push ebx
push eax
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0xa8]
push esi
push eax
push edi
call fcn.0040afef
add esp, 0x24
test eax, eax
jne 0x40688b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
jmp 0x406929
push 0x418878
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push esi
push edi
call fcn.004066bd
pop ecx
test eax, eax
pop ecx
je 0x40687f
push ebx
push 0x414144
lea eax, [ebp - 0x28]
push 0x418480
push edi
mov dword [0x418608], eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0xffffffffffffffff
push ebx
push 0x59c
call fcn.00406e92
add esp, 0xc
push eax
push edi
push 0xfffffffffffffffa
push edi
call dword [sym.imp.USER32.dll_GetWindowLongA]
push eax
call fcn.0040289b
add esp, 0xc
test eax, eax
jne 0x4068ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x406919
push 0x419154
push ebx
push esi
push 0x405edc
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
mov dword [0x41915c], eax
jne 0x406933
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.00402923
push 0x294
push ebx
push esi
call fcn.0040b6c0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x406945
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret