Function at 0x405280
Capabilities:
Get common file path
Get file attributes
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x415b3b
mov eax, dword fs:[0]
push eax
sub esp, 0x458
mov eax, dword [0x41c054]
xor eax, esp
mov dword [esp + 0x450], eax
push ebx
push esi
push edi
mov eax, dword [0x41c054]
xor eax, esp
push eax
lea eax, [esp + 0x468]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
lea eax, [esp + 0x254]
push eax
push 0x104
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push esi
call fcn.00405070
mov edi, eax
add esp, 4
push edi
lea edx, [esp + 0x28]
or ecx, 0xffffffff
mov dword [esp + 0x1c], edi
call fcn.00405130
mov ecx, dword [esp + 0x28]
mov edx, dword [0x41cea0]
mov eax, dword [edx + 0xc]
mov dword [esp + 0x18], ecx
add esp, 4
mov ecx, 0x41cea0
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x20], ebx
xor esi, esi
mov dword [esp + 0x470], esi
cmp dword [esp + 0x14], esi
jle 0x4053b0
push edi
lea edx, [esp + 0x28]
mov ecx, esi
call fcn.00405130
add esp, 4
test edi, edi
jne 0x405350
mov dword [0x41e1d8], 0x10000
jmp 0x405374
cmp dword [edi], 1
je 0x405361
mov dword [0x41e1d8], 0x80000
jmp 0x405374
mov ecx, dword [edi + 4]
lea edx, [esp + 0x28]
push edx
push esi
call fcn.00404d50
mov dword [0x41e1d8], eax
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x28]
push eax
push ecx
push str._s_s
lea edi, [esp + 0x2c]
call fcn.00407cb0
mov ebx, dword [esp + 0x2c]
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0xfffffffe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edi, dword [esp + 0x18]
inc esi
cmp esi, dword [esp + 0x14]
jl 0x405331
test edi, edi
jne 0x4053c3
mov dword [0x41e1d8], 0x10000
jmp 0x405466
cmp dword [edi], 1
je 0x4053d7
mov dword [0x41e1d8], 0x80000
jmp 0x405466
mov esi, dword [edi + 4]
cmp dword [esi + 4], 0xffffffff
je 0x4053eb
mov edi, dword [esi]
call fcn.00404560
mov edi, dword [esp + 0x18]
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
mov dword [esp + 0x14], eax
test eax, eax
je 0x405444
cmp dword [eax + 0x7c], 0
je 0x405411
mov edi, eax
call fcn.00404560
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov dword [esp + 0x1c], ecx
test ecx, ecx
je 0x40543b
cmp byte [ecx], 0
je 0x40542e
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00408b24
mov eax, dword [esp + 0x18]
add esp, 4
push eax
call fcn.00408837
add esp, 4
push esi
mov dword [esi], 0
mov dword [0x41e1d8], 0
call fcn.00408b24
add esp, 4
push edi
call fcn.00408b24
add esp, 4
lea eax, [esp + 0x254]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
add ebx, 0xfffffff0
mov dword [esp + 0x470], 0xffffffff
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40549b
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov ecx, dword [esp + 0x468]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x450]
xor ecx, esp
call fcn.00408828
mov esp, ebp
pop ebp
ret