Function at 0x495272
Capabilities:
Check if file exists
Create thread

Disassembly:
push 0x34
mov eax, 0x50d00f
call fcn.0049e056
mov edi, dword [ebp + 8]
mov esi, ecx
lea eax, [esi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0xffffffffffffffff
xor ebx, ebx
push ebx
lea eax, [edi + 0x228]
push eax
lea ecx, [esi + 0x28]
call fcn.004019f3
lea eax, [esi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4952dd
mov ecx, esi
call fcn.00494fb6
test al, al
jne 0x4955d1
call fcn.00491544
mov ecx, eax
call fcn.00442fe7
mov edx, dword [eax]
push ebx
push edi
push 0x14
mov ecx, eax
call dword [edx]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00493326
mov ecx, eax
call fcn.00495816
test al, al
je 0x4952ad
lea eax, [edi + 0x260]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00403757
push 0x535d58
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], ebx
call fcn.00403d14
test eax, eax
je 0x49533f
cmp dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x28]
jae 0x49531c
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x49533f
call fcn.00491544
mov ecx, eax
call fcn.00442fe7
mov edx, dword [eax]
push ebx
push edi
push 0xb
mov ecx, eax
call dword [edx]
jmp 0x4953bc
lea eax, [esi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esi + 0x10]
push eax
mov dword [esi + 8], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebp - 0x2c]
push eax
push edi
mov ecx, esi
call fcn.004950d6
mov dword [ebp - 0x34], eax
lea eax, [esi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esi + 0x10]
push eax
mov dword [esi + 8], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x34], ebx
jge 0x495396
call fcn.00493326
mov ecx, eax
call fcn.0049588d
jmp 0x4955c6
mov ecx, esi
call fcn.00494fb6
test al, al
jne 0x495385
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [edi + 0x260]
call fcn.004019f3
mov ecx, dword [esi + 0x60]
push edi
call fcn.004938e8
call fcn.00493326
mov ecx, eax
call fcn.0049588d
mov ecx, esi
call fcn.00494fb6
test al, al
jne 0x4955c6
mov ecx, dword [esi + 0x60]
push 7
call fcn.004933d4
call fcn.00491544
mov ecx, eax
call fcn.0045a40c
mov edx, dword [eax]
push ebx
push 1
push edi
push 6
mov ecx, eax
call dword [edx]
jmp 0x49542b
mov ecx, esi
call fcn.00494fb6
test al, al
jne 0x4955c6
call fcn.00491544
mov ecx, eax
call fcn.00442fe7
mov edx, dword [eax]
push ebx
push edi
push 0x14
mov ecx, eax
call dword [edx]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00493326
mov ecx, eax
call fcn.004958dd
test al, al
je 0x4953fb
call fcn.00491544
mov ecx, eax
call fcn.00442fe7
mov edx, dword [eax]
push ebx
push edi
push 0xd
mov ecx, eax
call dword [edx]
cmp dword [0x551910], 5
jg 0x495477
push ebx
push ebx
push esi
push 0x494fd5
push ebx
push ebx
mov byte [esi + 0xc], 1
call fcn.0049ab60
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, word [edi + 0x1e]
push esi
push eax
lea eax, [edi + 0x1c]
mov dword [ebp - 0x34], eax
movzx eax, word [eax]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x38], esp
push edi
call fcn.00403757
sub esp, 0x1c
lea eax, [edi + 0x244]
mov ecx, esp
mov dword [ebp - 0x40], esp
push eax
mov byte [ebp - 4], 1
call fcn.00403757
sub esp, 0x1c
lea eax, [ebp - 0x2c]
mov ecx, esp
mov dword [ebp - 0x3c], esp
push eax
mov byte [ebp - 4], 2
call fcn.00403757
mov byte [ebp - 4], 3
call fcn.00494dc0
mov ecx, eax
mov byte [ebp - 4], bl
call fcn.00497b16
mov byte [ebp - 0x2d], al
mov byte [esi + 0xc], bl
call fcn.00493326
mov ecx, eax
call fcn.00495917
mov ecx, esi
call fcn.00494fb6
test al, al
jne 0x4955c6
mov ecx, dword [esi + 0x60]
call fcn.00494380
test al, al
jne 0x495522
mov ecx, dword [esi + 0x60]
push 4
call fcn.004933d4
push 1
push dword [ebp - 0x34]
call fcn.00406523
mov ecx, eax
call fcn.00491b37
jmp 0x4955c6
mov ecx, esi
call fcn.00494fb6
test al, al
jne 0x4955c6
cmp byte [ebp - 0x2d], bl
jne 0x495588
call fcn.00491544
mov ecx, eax
call fcn.0045a40c
mov edx, dword [eax]
push ebx
push 2
push edi
push 6
mov ecx, eax
call dword [edx]
call fcn.00491544
mov ecx, eax
call fcn.0045a40c
mov edx, dword [eax]
push ebx
push 1
push edi
push 8
mov ecx, eax
call dword [edx]
call fcn.00491544
mov ecx, eax
call fcn.00442fe7
mov edx, dword [eax]
push ebx
push edi
push 0xe
mov ecx, eax
call dword [edx]
mov ecx, dword [esi + 0x60]
push 0xfffffffffffffffe
call fcn.004933d4
jmp 0x4955c6
mov ecx, dword [esi + 0x60]
push edi
call fcn.0049377d
mov ecx, esi
call fcn.00494fb6
test al, al
jne 0x4955c6
call fcn.00491544
mov ecx, eax
call fcn.00442fe7
mov edx, dword [eax]
push ebx
push edi
push 0xf
mov ecx, eax
call dword [edx]
mov eax, dword [esi + 0x60]
mov byte [eax + 0x27c], 1
mov ecx, dword [esi + 0x60]
push 6
call fcn.00494b01
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.0040184d
call fcn.0049e0d9
ret 4