Function at 0x405627
Capabilities:
Check if file exists
Get common file path
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x42005c]
push ebx
push esi
push edi
push dword [ebp + 0x18]
mov edi, ecx
lea ecx, [ebp - 0x418]
mov dword [ebp - 4], eax
mov dword [ebp - 0x408], edi
call fcn.00414ef1
push dword [ebp + 0x10]
mov ecx, dword [0x420b04]
push 0x325
push dword [ebp - 0x418]
call fcn.00409067
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 3
push 0xc0000000
push dword [ebp + 0x10]
mov dword [ebp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x405694
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x18], eax
jmp 0x40569b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x18], 2
je 0x4058ab
cmp dword [ebp + 0x18], 3
je 0x4058ab
mov esi, dword [edi + 0x330]
cmp esi, ebx
jne 0x4056d3
push dword [ebp + 0x14]
mov ecx, dword [0x420b04]
call fcn.00407eff
mov esi, eax
cmp esi, ebx
jne 0x4056d3
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0xc]
cmp dword [ebp + 0x18], ebx
je 0x405793
mov ebx, dword [ebp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4056ff
test al, 1
je 0x4056ff
and eax, 0xfffffffe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
jmp 0x40566a
test esi, 0x40000
je 0x405715
lea eax, [edi + 0x124]
cmp eax, ebx
je 0x405821
mov ecx, dword [0x420b04]
mov eax, dword [ecx]
call dword [eax + 0x3c]
test eax, eax
jne 0x40578c
push 0x200
lea eax, [ebp - 0x204]
push eax
push 0x324
push dword [0x420afc]
call dword [sym.imp.USER32.dll_LoadStringA]
push ebx
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x404]
push eax
call fcn.0040c280
mov eax, dword [0x420b04]
mov ecx, dword [eax + 0x1264]
mov eax, dword [eax + 0x22c]
add esp, 0xc
push 3
push ecx
lea ecx, [ebp - 0x404]
push ecx
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
je 0x40566a
cmp eax, 7
jne 0x40589b
xor eax, eax
jmp 0x4058ae
mov ecx, dword [0x420b04]
mov eax, dword [ecx]
call dword [eax + 0x10]
test al, 4
je 0x4058ab
push dword [ebp + 0x10]
lea ecx, [ebp - 0x418]
call fcn.00414e71
cmp eax, ebx
je 0x40578c
cmp eax, 1
je 0x4058ab
test esi, 0x20000
jne 0x4058ab
test esi, 0x400
jne 0x40578c
mov ecx, dword [0x420b04]
mov eax, dword [ecx]
call dword [eax + 0x3c]
test eax, eax
jne 0x40578c
mov eax, dword [ebp + 0x10]
lea edx, [edi + 0x124]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4057ef
mov eax, dword [0x420b04]
mov eax, dword [eax + 0x22c]
push edi
push 0x4052a4
push eax
push 0x259
push dword [0x420afc]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
jmp 0x4058ae
lea ebx, [edi + 0x124]
add edi, 0x348
mov edx, edi
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405833
push 0x5c
push edi
call fcn.0040c360
pop ecx
pop ecx
push ebx
push 0
push 0x401c4c
mov esi, eax
push edi
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
mov byte [esi], 0x5c
jne 0x40588a
mov ecx, dword [0x420b04]
push 0x1770
push 0x321
call fcn.00407f9f
mov eax, edi
sub ebx, edi
mov cl, byte [eax]
mov byte [ebx + eax], cl
inc eax
test cl, cl
jne 0x40587b
or eax, 0xffffffff
jmp 0x4058ae
mov ecx, dword [ebp - 0x408]
xor eax, eax
inc eax
mov dword [ecx + 0x344], eax
jmp 0x4058ae
xor ecx, ecx
cmp eax, 2
setne cl
lea ecx, [ecx + ecx - 1]
mov eax, ecx
jmp 0x4058ae
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0040bf1b
leave
ret 0x14