Function at 0x405950
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x452206
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x4620e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
push 0
push 0x455a11
mov dword [ebp - 0x60], ecx
call fcn.00407a60
cmp dword [esi + 0x14], 0x10
jb 0x40599d
mov esi, dword [esi]
push ebx
push esi
lea eax, [ebp - 0x40]
mov ecx, edi
push eax
call fcn.00405be0
push eax
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0
push eax
mov ecx, edi
call fcn.00406790
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 4], 2
cmp eax, 0x10
jb 0x4059d6
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00407bd0
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
push 0x455ad4
lea eax, [ebp - 0x28]
mov ebx, 0x80004005
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00404f20
add esp, 0xc
cmp dword [eax + 0x14], 0x10
jb 0x405a0a
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
mov eax, dword [ebp - 0x44]
cmovne ebx, ecx
shr ebx, 0x1f
cmp eax, 0x10
jb 0x405a5a
mov ecx, dword [ebp - 0x58]
inc eax
cmp eax, 0x1000
jb 0x405a51
test cl, 0x1f
jne 0x405ac7
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x405ac7
sub ecx, eax
cmp ecx, 4
jb 0x405ac7
cmp ecx, 0x23
ja 0x405ac7
mov ecx, eax
push ecx
call fcn.0040fdd5
add esp, 4
test bl, bl
je 0x405ad6
mov edi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 0x5c], 0x5c
lea eax, [edi - 2]
cmp edi, 1
jb 0x405acc
lea ecx, [edi - 1]
cmp eax, ecx
lea esi, [ebp - 0x28]
cmovb ecx, eax
cmp ebx, 0x10
cmovae esi, dword [ebp - 0x28]
add esi, ecx
cmp byte [esi], 0x5c
jne 0x405a92
mov al, byte [esi]
lea ecx, [ebp - 0x5c]
cmp al, byte [ecx]
je 0x405aa1
lea ecx, [ebp - 0x28]
call fcn.004071b0
cmp esi, eax
je 0x405acc
dec esi
jmp 0x405a84
mov edx, dword [ebp - 0x28]
lea eax, [ebp - 0x28]
cmp ebx, 0x10
cmovae eax, edx
sub esi, eax
cmp esi, 0xffffffff
je 0x405acf
sub edi, esi
lea ecx, [ebp - 0x28]
dec edi
inc esi
push edi
push esi
call fcn.00407c20
jmp 0x4059e8
call fcn.0041ae21
mov edx, dword [ebp - 0x28]
xor esi, esi
jmp 0x405b63
push 0x455ad4
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00404f20
add esp, 0xc
mov esi, eax
mov edi, dword [ebp - 0x60]
cmp edi, esi
je 0x405b2c
mov eax, dword [edi + 0x14]
cmp eax, 0x10
jb 0x405b07
inc eax
mov ecx, edi
push eax
push dword [edi]
call fcn.00407bd0
mov dword [edi + 0x14], 0xf
cmp dword [edi + 0x14], 0x10
mov dword [edi + 0x10], 0
jb 0x405b1f
mov eax, dword [edi]
jmp 0x405b21
mov eax, edi
push esi
mov ecx, edi
mov byte [eax], 0
call fcn.00406ee0
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jb 0x405b41
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00407bd0
cmp dword [edi + 0x14], 0x10
jb 0x405b49
mov edi, dword [edi]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, dword [ebp - 0x14]
xor ecx, ecx
mov edx, dword [ebp - 0x28]
cmp eax, 0xffffffff
mov esi, 0x80004005
cmovne esi, ecx
cmp ebx, 0x10
jb 0x405b75
lea ecx, [ebx + 1]
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00407bd0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004108c8
mov esp, ebp
pop ebp
ret 0xc