Function at 0x4212d0
Capabilities:
Get common file path
Get startup folder
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47268b
mov eax, dword fs:[0]
push eax
sub esp, 0x2a8
mov eax, dword [0x49c00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xor al, al
mov dword [ebp - 0x2b0], 0
mov byte [ebp - 0x2a1], al
mov eax, dword [edi + 0x440]
mov dword [ebp - 0x21c], eax
test eax, eax
je 0x4217a3
lea esi, [eax + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x21c]
push esi
mov al, byte [ecx + 0xc]
mov byte [ebp - 0x2a2], al
call dword [0x47e0a4]
cmp byte [ebp - 0x2a2], 0
jne 0x4217a3
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 5
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
xor eax, eax
mov dword [ebp - 0x224], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x224], 0
lea edx, [ecx + 2]
mov dword [ebp - 0x220], 7
mov word [ebp - 0x234], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4213a1
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x234]
call fcn.00404600
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x234]
push 8
push str.TAFTool
call fcn.00412d20
push 0xd
push str.Untitled.taf
lea ecx, [ebp - 0x234]
call fcn.00412d20
push 0x54
lea eax, [ebp - 0x2a0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x23c], 0
xor eax, eax
mov dword [ebp - 0x238], 0
lea ecx, [ebp - 0x24c]
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 7
push eax
push 0x47f580
mov word [ebp - 0x24c], ax
call fcn.00404600
mov byte [ebp - 4], 1
mov eax, dword [edi + 0xe0]
mov dword [ebp - 0x2a0], eax
xor eax, eax
mov dword [ebp - 0x28c], 0
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x28c], 0
mov dword [ebp - 0x288], 7
mov word [ebp - 0x29c], ax
mov byte [ebp - 4], 2
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x27c]
mov dword [ebp - 0x284], str.TAFTool__.taf_
mov dword [ebp - 0x280], 0x48162c
call fcn.00407a80
mov byte [ebp - 4], 3
lea eax, [ebp - 0x24c]
push eax
lea ecx, [ebp - 0x264]
call fcn.00407a80
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x24c]
call fcn.00404570
lea eax, [ebp - 0x24c]
push eax
lea ecx, [ebp - 0x2a0]
call fcn.004184c0
mov esi, eax
mov byte [ebp - 4], 7
lea eax, [ebp - 0x234]
cmp eax, esi
je 0x421526
mov ecx, eax
call fcn.00404570
movups xmm0, xmmword [esi]
xor eax, eax
movups xmmword [ebp - 0x234], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x224], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x24c]
call fcn.00404570
cmp dword [ebp - 0x224], 0
je 0x421764
lea edx, [ebp - 0x234]
lea ecx, [ebp - 0x24c]
call fcn.004117f0
mov byte [ebp - 4], 8
call fcn.0042f5b0
lea ecx, [eax + 0x4c]
lea eax, [ebp - 0x24c]
cmp ecx, eax
je 0x421583
cmp dword [ebp - 0x238], 8
push dword [ebp - 0x23c]
cmovae eax, dword [ebp - 0x24c]
push eax
call fcn.00404600
mov ecx, dword [edi + 0x424]
lea edx, [ebp - 0x234]
push edx
mov eax, dword [ecx]
call dword [eax + 0x18]
mov ecx, edi
call fcn.00422600
mov ecx, dword [edi + 0x440]
lea eax, [ebp - 0x234]
add ecx, 0x2c
cmp ecx, eax
je 0x4215c9
cmp dword [ebp - 0x220], 8
push dword [ebp - 0x224]
cmovae eax, dword [ebp - 0x234]
push eax
call fcn.00404600
lea edx, [edi + 0x424]
mov dword [ebp - 0x21c], 0
lea ecx, [ebp - 0x21c]
call fcn.00424640
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x21c]
mov eax, dword [ecx]
mov eax, dword [eax]
call eax
mov esi, eax
mov eax, dword [edi + 0x440]
mov dword [ebp - 0x2b4], eax
mov eax, dword [eax + 0x44]
mov dword [ebp - 0x2ac], eax
cmp eax, esi
je 0x421674
test eax, eax
je 0x42164b
add eax, 8
push eax
mov dword [ebp - 0x2a8], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
add dword [ebx - 0x2ab73], ecx
dec dword [ebx - 0x3f7afbbf]
je 0x42163e
add eax, 0xffffffff
mov dword [ecx + 4], eax
jne 0x42163e
mov eax, dword [ecx]
push 1
call dword [eax]
push dword [ebp - 0x2a8]
mov eax, dword [0x47e0a4]
call eax
mov eax, dword [ebp - 0x2b4]
mov dword [eax + 0x44], esi
test esi, esi
je 0x4216a7
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
inc dword [esi + 4]
lea eax, [esi + 8]
push eax
call dword [0x47e0a4]
lea eax, [esi + 8]
jmp 0x42167b
lea eax, [esi + 8]
test esi, esi
je 0x4216a7
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 4]
test eax, eax
je 0x421699
add eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x421699
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
lea eax, [esi + 8]
mov esi, dword [0x47e0a4]
push eax
call esi
jmp 0x4216ad
mov esi, dword [0x47e0a4]
cmp dword [edi + 0x414], 0
je 0x4216c2
mov ecx, dword [edi + 0x440]
mov eax, dword [ebp + 8]
mov dword [ecx + 0x28], eax
mov eax, dword [edi + 0x440]
mov dword [ebp - 0x2a8], eax
add eax, 0x10
push eax
mov dword [ebp - 0x2ac], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x2a8]
push dword [ebp - 0x2ac]
mov al, byte [eax + 0xc]
mov byte [ebp - 0x2a2], al
call esi
cmp byte [ebp - 0x2a2], 0
jne 0x421739
push dword [ebp - 0x2ac]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x2a8]
push dword [ebp - 0x2ac]
mov byte [eax + 0xc], 1
call esi
mov esi, dword [ebp - 0x2a8]
push 0
push 0
push esi
push 0x416350
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 8], eax
mov byte [ebp - 0x2a1], 1
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x21c]
test ecx, ecx
je 0x421755
mov eax, dword [ecx]
push 1
call dword [eax + 4]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x24c]
call fcn.00404570
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x264]
call fcn.00404570
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x27c]
call fcn.00404570
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x29c]
call fcn.00404570
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call fcn.00404570
call fcn.0042f5b0
mov dword [ebp - 4], 0xd
add eax, 0x34
push eax
lea ecx, [ebp - 0x24c]
call fcn.00407a80
mov dword [ebp - 0x2b0], 2
cmp dword [eax + 0x14], 8
jb 0x4217d0
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov edx, 2
mov dword [ebp - 0x2b0], edx
and edx, 0xfffffffd
mov dword [ebp - 0x2b0], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24c]
call fcn.00404570
mov al, byte [ebp - 0x2a1]
test al, al
je 0x421814
mov ecx, edi
call fcn.00423770
mov al, byte [ebp - 0x2a1]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046c079
mov esp, ebp
pop ebp
ret 4