Function at 0x406700
Capabilities:
Check if file exists
Create thread
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x26c
mov eax, dword [0x44e330]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x25c], ecx
mov dword [ebp - 0x258], 0
push 0
mov ecx, dword [ebp - 0x25c]
add ecx, 4
call fcn.00407be0
push 0xc
call dword [sym.imp.USER32.dll_GetSystemMetrics]
push eax
push 0xb
call dword [sym.imp.USER32.dll_GetSystemMetrics]
push eax
push 0
push ecx
mov ecx, esp
push 0x80
call fcn.00407ad0
call fcn.00407e70
add esp, 0x10
mov dword [ebp - 0x218], eax
push 1
mov eax, dword [ebp - 0x218]
push eax
mov ecx, dword [ebp - 0x25c]
add ecx, 4
call fcn.00407b90
push 0x32
call dword [sym.imp.USER32.dll_GetSystemMetrics]
push eax
push 0x31
call dword [sym.imp.USER32.dll_GetSystemMetrics]
push eax
push 0
push ecx
mov ecx, esp
push 0x80
call fcn.00407ad0
call fcn.00407e70
add esp, 0x10
mov dword [ebp - 0x21c], eax
push 0
mov ecx, dword [ebp - 0x21c]
push ecx
mov ecx, dword [ebp - 0x25c]
add ecx, 4
call fcn.00407b90
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
mov ecx, 0x44f740
call fcn.00407a00
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x25c], 0
je 0x4067f0
mov edx, dword [ebp - 0x25c]
add edx, 0x20
mov dword [ebp - 0x260], edx
jmp 0x4067fa
mov dword [ebp - 0x260], 0
mov eax, dword [ebp - 0x260]
push eax
mov ecx, dword [ebp - 0x224]
call fcn.00407980
cmp dword [ebp - 0x25c], 0
je 0x406826
mov ecx, dword [ebp - 0x25c]
add ecx, 0x24
mov dword [ebp - 0x264], ecx
jmp 0x406830
mov dword [ebp - 0x264], 0
mov edx, dword [ebp - 0x264]
push edx
mov ecx, dword [ebp - 0x224]
call fcn.004079c0
mov eax, dword [ebp - 0x25c]
mov ecx, dword [eax + 4]
push ecx
mov ecx, dword [ebp - 0x25c]
add ecx, 0x28
call fcn.00407ef0
push 0x3e8
lea edx, [ebp - 0x238]
push edx
mov ecx, dword [ebp - 0x25c]
add ecx, 4
call fcn.00407b60
mov ecx, eax
call fcn.00407550
push eax
mov ecx, dword [ebp - 0x25c]
add ecx, 0x44
call fcn.004060e0
push 0x64
push 0
mov ecx, dword [ebp - 0x25c]
add ecx, 0x44
call fcn.004073a0
mov ecx, dword [ebp - 0x25c]
add ecx, 0x40
call fcn.004070f0
movzx eax, al
test eax, eax
je 0x4068e7
push 0
push 0x44381c
push 0x443824
mov ecx, dword [ebp - 0x25c]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0xa
mov ecx, dword [ebp - 0x25c]
add ecx, 4
call fcn.00407b40
mov eax, 1
jmp 0x406c12
mov dword [ebp - 0x220], 0
push 0x443834
push 1
lea eax, [ebp - 0x240]
push eax
mov ecx, dword [ebp - 0x25c]
add ecx, 0x40
call fcn.00407200
or dword [ebp - 0x258], 1
push eax
call fcn.00407270
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x406963
push 0x443838
push 1
lea edx, [ebp - 0x244]
push edx
mov ecx, dword [ebp - 0x25c]
add ecx, 0x40
call fcn.00407170
or dword [ebp - 0x258], 2
push eax
call fcn.00407270
add esp, 8
movzx eax, al
test eax, eax
je 0x406963
mov dword [ebp - 0x268], 1
jmp 0x40696d
mov dword [ebp - 0x268], 0
mov cl, byte [ebp - 0x268]
mov byte [ebp - 0x239], cl
mov edx, dword [ebp - 0x258]
and edx, 2
je 0x406996
and dword [ebp - 0x258], 0xfffffffd
lea ecx, [ebp - 0x244]
call fcn.00401230
mov eax, dword [ebp - 0x258]
and eax, 1
je 0x4069b3
and dword [ebp - 0x258], 0xfffffffe
lea ecx, [ebp - 0x240]
call fcn.00401230
movzx ecx, byte [ebp - 0x239]
test ecx, ecx
je 0x406a4e
mov dword [ebp - 0x220], 1
mov ecx, dword [ebp - 0x25c]
add ecx, 0x40
call fcn.004070d0
sub eax, 1
push eax
lea edx, [ebp - 0x248]
push edx
mov ecx, dword [ebp - 0x25c]
add ecx, 0x40
call fcn.00407170
push eax
mov ecx, dword [ebp - 0x25c]
add ecx, 0x40
call fcn.00407130
lea ecx, [ebp - 0x248]
call fcn.00401230
mov ecx, dword [ebp - 0x25c]
add ecx, 0x40
call fcn.004070d0
sub eax, 1
push eax
lea eax, [ebp - 0x24c]
push eax
mov ecx, dword [ebp - 0x25c]
add ecx, 0x40
call fcn.00407200
push eax
mov ecx, dword [ebp - 0x25c]
add ecx, 0x40
call fcn.00407130
lea ecx, [ebp - 0x24c]
call fcn.00401230
push 2
call fcn.00408a00
add esp, 4
mov dword [ebp - 0x250], 0x198
mov ecx, dword [ebp - 0x250]
push ecx
call fcn.0042e392
add esp, 4
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x254], 0
je 0x406aa6
mov edx, dword [ebp - 0x250]
push edx
push 0
mov eax, dword [ebp - 0x254]
push eax
call fcn.0042e9b0
add esp, 0xc
mov ecx, dword [ebp - 0x254]
mov dword [ebp - 0x26c], ecx
jmp 0x406ab0
mov dword [ebp - 0x26c], 0
mov edx, dword [ebp - 0x26c]
mov dword [ebp - 0x214], edx
mov eax, dword [ebp - 0x214]
mov ecx, dword [ebp - 0x25c]
mov dword [eax + 0x190], ecx
mov edx, dword [ebp - 0x214]
mov eax, dword [ebp - 0x220]
mov dword [edx + 0x194], eax
mov ecx, dword [ebp - 0x25c]
add ecx, 0x40
call fcn.00407550
push eax
call fcn.00407050
add esp, 4
push eax
mov ecx, dword [ebp - 0x214]
add ecx, 0xc8
push ecx
call fcn.0042f210
add esp, 8
push 0
push 0x1a
lea edx, [ebp - 0x210]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x44383c
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x210]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x406b52
lea edx, [ebp - 0x210]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov ecx, dword [ebp - 0x25c]
add ecx, 0x40
call fcn.00407550
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x210]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [ebp - 0x210]
push edx
mov ecx, dword [ebp - 0x25c]
add ecx, 0x48
call fcn.00407150
lea eax, [ebp - 0x210]
push eax
call fcn.00407050
add esp, 4
push eax
mov ecx, dword [ebp - 0x214]
push ecx
call fcn.0042f210
add esp, 8
mov dword [ebp - 0x228], 0
lea edx, [ebp - 0x228]
push edx
push 0
mov eax, dword [ebp - 0x214]
push eax
push 0x4065d0
push 0
push 0
call fcn.0042f15a
add esp, 0x18
mov dword [ebp - 0x22c], eax
mov ecx, dword [ebp - 0x22c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x220], 0
jne 0x406c0d
push 0xa
mov ecx, dword [ebp - 0x25c]
add ecx, 4
call fcn.00407b40
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e618
mov esp, ebp
pop ebp
ret 0x10