Function at 0x405bb0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46190e
mov eax, dword fs:[0]
push eax
sub esp, 0x160
push ebx
push esi
push edi
mov eax, dword [0x4786a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
cmp byte [0x47b8a9], 0
je 0x405c21
push 0x47b7a0
call fcn.0040e530
push 0x642
sub esp, 0x1c
mov ecx, esp
xor eax, eax
mov dword [ebp - 0x1c], esp
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
mov word [ecx], ax
push eax
mov eax, 0x46cea0
call fcn.00429690
call fcn.00406170
cmp byte [0x47b8a8], 0
je 0x405d3d
mov ecx, dword [0x47b830]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push ecx
call esi
test eax, eax
je 0x405c5b
cmp byte [0x47b8ae], 0
jne 0x405c5b
mov edx, dword [0x47b830]
push edx
mov ecx, 0x47b7a0
call fcn.00418ce0
mov eax, dword [0x47b83c]
push eax
call esi
test eax, eax
je 0x405d3d
cmp byte [0x47b8ae], 0
jne 0x405d3d
cmp byte [0x47b8b2], 0
jne 0x405d3d
mov ecx, dword [0x47b83c]
push ecx
mov ecx, 0x47b7a0
call fcn.00418ce0
mov eax, dword [0x47b780]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x24], esp
mov esi, esp
call fcn.004218e0
add eax, 0x10
mov dword [esi], eax
mov dword [ebp - 4], 0
mov eax, dword [0x47b848]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x14], esp
mov esi, esp
call fcn.004218e0
add eax, 0x10
mov dword [esi], eax
or edi, 0xffffffff
lea esi, [ebp - 0x1c]
mov dword [ebp - 4], edi
call fcn.004196c0
mov dword [ebp - 4], 1
mov edx, dword [ebp - 0x1c]
mov esi, dword [sym.imp.SHLWAPI.dll_PathIsDirectoryEmptyW]
push edx
call esi
test eax, eax
je 0x405d00
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, 0x47b7a0
call fcn.00418ce0
mov ecx, dword [0x47b848]
push ecx
call esi
test eax, eax
je 0x405d1e
mov edx, dword [0x47b848]
push edx
mov ecx, 0x47b7a0
call fcn.00418ce0
mov dword [ebp - 4], edi
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x405d3d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [0x47b5c0], 0
je 0x40604a
cmp dword [0x47b93c], 0
je 0x40604a
lea ecx, [ebp - 0xc4]
push ecx
mov dword [ebp - 4], 2
call fcn.0041f9d0
lea edx, [ebp - 0x16c]
push edx
mov byte [ebp - 4], 3
call fcn.0041f200
mov byte [ebp - 0xc8], 0
mov ebx, 4
push ebx
lea esi, [ebp - 0xc4]
mov byte [ebp - 4], bl
call fcn.00423250
mov edx, 0x47b8fc
mov ecx, eax
call fcn.00403f50
mov esi, eax
mov eax, dword [0x47b7e0]
cdq
push edx
push eax
call fcn.00403f10
lea eax, [ebp - 0xc4]
push eax
lea edi, [ebp - 0x16c]
mov ecx, 0x47b7a0
call fcn.0041d610
xor eax, eax
push eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
call fcn.00423fc0
lea eax, [ebp - 0x18]
mov edi, 0x47b93c
mov byte [ebp - 4], 5
call fcn.0041fad0
mov byte [ebp - 4], bl
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x405e1c
lea ecx, [esi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x405e1c
mov eax, dword [esi]
mov edx, dword [eax]
mov ecx, esi
call edx
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x405e1c
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
lea ecx, [ebp - 0x16c]
mov byte [ebp - 4], 3
call fcn.004060f0
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 2
call fcn.00406070
mov dword [ebp - 4], 0xffffffff
cmp dword [0x47b904], 0
je 0x405e6f
mov eax, dword [0x47b900]
cmp dword [eax - 0xc], 0
je 0x405e6f
push 0
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x14], esp
mov esi, esp
call fcn.004218e0
add eax, 0x10
mov dword [esi], eax
call fcn.00415a20
cmp byte [0x47b8b2], 0
je 0x40604a
mov ecx, dword [0x47b8ec]
cmp dword [ecx - 0xc], 0
je 0x40604a
push ecx
mov edx, esp
mov dword [ebp - 0x14], esp
push edx
mov ecx, 0x46ce9c
call fcn.00401110
mov dword [ebp - 4], 7
mov eax, dword [0x47b8ec]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x24], esp
mov esi, esp
call fcn.004218e0
add eax, 0x10
mov dword [esi], eax
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 4], 0xffffffff
call fcn.00419270
push ecx
mov ebx, 8
mov ecx, esp
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], esp
push ecx
mov ecx, 0x46ce9c
call fcn.00401110
mov byte [ebp - 4], 9
mov eax, dword [0x47b8ec]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x24], esp
mov esi, esp
call fcn.004218e0
add eax, 0x10
mov dword [esi], eax
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.00419120
mov byte [ebp - 4], 0xa
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call edi
cmp dword [0x47b8c4], 0
mov ebx, dword [0x47b8f0]
sete dl
movzx eax, dl
push eax
mov eax, dword [ebp - 0x2c]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x14], esp
mov esi, esp
call fcn.004218e0
add eax, 0x10
mov dword [esi], eax
call fcn.00416870
test al, al
jne 0x405f16
mov ecx, dword [ebp - 0x28]
push ecx
mov ecx, 0x47b7a0
call fcn.00418ce0
mov eax, dword [0x47b838]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x14], esp
mov esi, esp
call fcn.004218e0
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 0xb
mov eax, dword [0x47b834]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x24], esp
mov esi, esp
call fcn.004218e0
add eax, 0x10
mov dword [esi], eax
mov bl, 0xa
lea esi, [ebp - 0x20]
mov byte [ebp - 4], bl
call fcn.004196c0
mov byte [ebp - 4], 0xc
mov edx, dword [ebp - 0x20]
mov esi, dword [sym.imp.SHLWAPI.dll_PathIsDirectoryEmptyW]
push edx
call esi
test eax, eax
je 0x405fc1
mov eax, dword [ebp - 0x20]
push eax
mov ecx, 0x47b7a0
call fcn.00418ce0
mov ecx, dword [0x47b834]
push ecx
call esi
test eax, eax
je 0x405fdf
mov edx, dword [0x47b834]
push edx
mov ecx, 0x47b7a0
call fcn.00418ce0
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406001
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406024
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40604a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret