Function at 0x40b850
Capabilities:
Check if file exists

Disassembly:
push ebp
lea ebp, [esp - 0x804]
sub esp, 0x804
push 0xffffffffffffffff
push 0x477140
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x494db8]
xor eax, ebp
mov dword [ebp + 0x800], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x814]
mov ecx, dword [ebp + 0x818]
mov edx, dword [ebp + 0x81c]
push eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x24], edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40b93b
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ebx
lea edi, [ebp - 0x14]
call fcn.0040d870
cmp eax, ebx
jl 0x40b925
push ecx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x14]
mov eax, esp
mov dword [eax], ecx
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x28], esp
cmp eax, ebx
je 0x40b8eb
mov edx, dword [eax]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [ebp - 0x18]
call fcn.0040dae0
cmp eax, ebx
jge 0x40b942
cmp eax, 0x80004002
je 0x40b942
push eax
call fcn.0044b560
mov dword [ebp - 4], 1
mov eax, 0x40b911
ret
mov edx, dword [ecx + 8]
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40b93b
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
xor eax, eax
jmp 0x40bb23
mov dword [ebp - 4], 1
mov esi, dword [ebp - 0x18]
cmp esi, ebx
sete al
cmp al, bl
je 0x40b981
mov byte [ebp - 4], bl
cmp esi, ebx
je 0x40b964
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push esi
call ecx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40b97a
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
xor eax, eax
jmp 0x40bb23
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jne 0x40b992
push 0x80004003
call fcn.0044b560
mov edi, dword [ebp - 0x20]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x50]
push edi
push eax
call edx
test eax, eax
jge 0x40b9ce
mov byte [ebp - 4], bl
cmp esi, ebx
je 0x40b9b1
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push esi
call ecx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40b97a
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
xor eax, eax
jmp 0x40bb23
mov ecx, dword [ebp - 0x1c]
cmp ecx, ebx
je 0x40ba06
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jne 0x40b9e6
push 0x80004003
call fcn.0044b560
mov edx, dword [eax]
push ecx
push eax
mov eax, dword [edx + 0x2c]
call eax
test eax, eax
jge 0x40ba06
mov byte [ebp - 4], bl
cmp esi, ebx
je 0x40b925
mov ecx, dword [esi]
push esi
jmp 0x40b920
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jne 0x40ba17
push 0x80004003
call fcn.0044b560
mov ecx, dword [eax]
mov edx, dword [ecx + 0x3c]
push 5
push eax
call edx
test eax, eax
jge 0x40ba55
mov byte [ebp - 4], bl
cmp esi, ebx
je 0x40ba34
push esi
mov eax, dword [esi]
mov ecx, dword [eax + 8]
call ecx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40b93b
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
xor eax, eax
jmp 0x40bb23
push 0x800
lea ecx, [ebp]
push ebx
push ecx
call fcn.0045bc00
push 0x400
lea edx, [ebp]
push edi
push edx
call fcn.0045cd4c
add esp, 0x18
lea eax, [ebp]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov ecx, dword [ebp + 0x820]
cmp ecx, ebx
jle 0x40baa5
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jne 0x40ba9b
push 0x80004003
call fcn.0044b560
mov edx, dword [eax]
push ecx
push edi
push eax
mov eax, dword [edx + 0x44]
call eax
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jne 0x40bab6
push 0x80004003
call fcn.0044b560
mov ecx, dword [eax]
lea edx, [ebp]
push edx
push eax
mov eax, dword [ecx + 0x24]
call eax
test eax, eax
jge 0x40bad9
mov byte [ebp - 4], bl
cmp esi, ebx
je 0x40b925
mov ecx, dword [esi]
push esi
jmp 0x40b920
cmp esi, ebx
jne 0x40bae7
push 0x80004003
call fcn.0044b560
mov ecx, dword [ebp - 0x24]
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
push 1
push ecx
push esi
call edx
mov byte [ebp - 4], bl
push esi
test eax, eax
jl 0x40ba2d
mov ecx, dword [esi]
mov edx, dword [ecx + 8]
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40bb1e
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x800]
xor ecx, ebp
call fcn.0045bbec
add ebp, 0x804
mov esp, ebp
pop ebp
ret 0x18