Function at 0x406dc0
Capabilities:
Check if file exists

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x424a90
push eax
mov al, byte [esp + 0x14]
mov dword fs:[0], esp
sub esp, 0x20
test al, 3
push ebx
push esi
mov ebx, ecx
jne 0x406df9
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret 8
mov esi, dword [esp + 0x38]
mov eax, dword [esi + 4]
test eax, eax
jne 0x406e09
mov eax, 0x426230
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x406e29
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret 8
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax + 8]
test ecx, ecx
jne 0x406e51
mov ecx, ebx
call fcn.004069e0
test al, al
jne 0x406e51
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret 8
mov ecx, dword [0x42622c]
push ebp
push edi
lea ebp, [ebx + 0x40]
push ecx
push 0
push esi
mov ecx, ebp
call fcn.004038a0
mov eax, dword [esi + 4]
mov edi, dword [esi + 8]
test eax, eax
je 0x406e7d
mov ecx, esi
call fcn.00402c20
add edi, dword [esi + 4]
jmp 0x406e82
mov edi, 0x426230
cmp byte [edi], 0x5c
je 0x406ea3
mov edi, 0x42c4e8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42c4e8
mov ecx, ebp
call fcn.00405b40
mov eax, dword [ebx + 0x34]
mov byte [esp + 0x44], 0
test eax, eax
jne 0x406eb4
mov eax, 0x426230
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebx + 0x2c], eax
je 0x406fe8
mov dl, byte [esp + 0x40]
push 0
lea ecx, [esp + 0x14]
mov byte [esp + 0x14], dl
call fcn.00402800
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x38], 0
mov ecx, dword [eax + 4]
mov eax, ecx
mov esi, dword [ecx]
cmp esi, eax
je 0x406fa5
mov eax, dword [esp + 0x40]
lea edi, [esi + 8]
lea ecx, [esp + 0x20]
lea ebp, [edi + 0x14]
push ebp
push eax
push ecx
call fcn.00405d30
add esp, 0xc
mov edx, dword [0x42622c]
lea ecx, [esp + 0x10]
push edx
push 0
push eax
mov byte [esp + 0x44], 1
call fcn.004038a0
mov eax, dword [esp + 0x24]
xor edx, edx
cmp eax, edx
mov byte [esp + 0x38], 0
je 0x406f65
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x406f5a
cmp al, 0xff
je 0x406f5a
dec al
mov byte [ecx], al
jmp 0x406f65
push ecx
call fcn.0040c880
add esp, 4
xor edx, edx
lea eax, [esp + 0x10]
mov ecx, ebx
push eax
push edi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
call fcn.00407020
test al, al
je 0x406fc4
push ebp
push 0
mov ecx, ebx
call fcn.00406730
mov ecx, ebx
call fcn.00406750
test al, al
je 0x406fa5
mov ecx, dword [ebx + 0xc]
mov esi, dword [esi]
cmp esi, dword [ecx + 4]
jne 0x406f06
mov ecx, dword [esp + 0x14]
mov byte [esp + 0x44], 1
test ecx, ecx
je 0x406fe8
mov al, byte [ecx - 1]
test al, al
je 0x406fde
cmp al, 0xff
je 0x406fde
dec al
mov byte [ecx - 1], al
jmp 0x406fe8
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x406fe8
mov al, byte [ecx - 1]
test al, al
je 0x406fde
cmp al, 0xff
je 0x406fde
dec al
mov byte [ecx - 1], al
jmp 0x406fe8
dec ecx
push ecx
call fcn.0040c880
add esp, 4
mov eax, dword [ebx + 0x2c]
pop edi
cmp eax, 0xffffffff
pop ebp
je 0x407000
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x2c], 0xffffffff
mov ecx, dword [esp + 0x28]
mov al, byte [esp + 0x3c]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret 8