Function at 0x4cf5b0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
neg eax
mov dword [ebp - 0x1c], eax
test esi, esi
je 0x4cf7bf
cmp edi, 8
ja 0x4cf848
mov eax, dword [ebp + 0x10]
dec eax
mov dword [ebp - 0x28], eax
mov cl, 1
lea eax, [edi - 2]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], ecx
cmp dword [ebp - 0x20], 6
jbe 0x4cf818
mov ecx, 0x2000
xor ebx, ebx
xor eax, eax
inc eax
mov dl, byte [0x592094]
mov byte [ebp - 0x18], dl
mov dword [ebp - 0x14], eax
push eax
mov dword [ebp - 0x10], ecx
push ecx
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf637
test bl, bl
je 0x4cf637
mov eax, dword [ebp - 0x10]
and eax, 0x1000
je 0x4cf637
cmp byte [ebp - 0x18], 0
jne 0x4cf8e3
test edi, edi
je 0x4cf7a1
mov eax, dword [ebp + 0xc]
lock add dword [0x592098], eax
test dword [ebp - 0x28], edi
je 0x4cf797
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test eax, eax
je 0x4cf815
mov eax, dword [ebp + 0xc]
lock sub dword [0x592098], eax
mov eax, dword [ebp - 0x24]
add edi, dword [ebp - 0x28]
and edi, dword [ebp - 0x1c]
mov esi, edi
test al, 1
mov ecx, 0
jne 0x4cf5e7
mov eax, dword [ebp + 0x10]
lea esi, [eax - 0x10000]
mov dword [ebp - 0x24], esi
add esi, dword [ebp + 0xc]
jb 0x4cf84b
cmp dword [ebp - 0x20], 6
jbe 0x4cf851
mov ecx, 0x2000
mov dword [ebp - 0x1c], 0
xor eax, eax
inc eax
mov bl, byte [0x592094]
mov dword [ebp - 0x18], eax
push eax
mov dword [ebp - 0x10], ecx
push ecx
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf6ed
cmp byte [ebp - 0x1c], 0
je 0x4cf6ed
mov eax, dword [ebp - 0x10]
and eax, 0x1000
je 0x4cf6ed
test bl, bl
jne 0x4cfb3a
test edi, edi
je 0x4cf7e5
lock add dword [0x592098], esi
mov eax, edi
and eax, dword [ebp - 0x28]
mov ebx, dword [ebp + 0x10]
cmove ebx, eax
sub ebx, eax
mov eax, dword [ebp - 0x24]
sub eax, ebx
or eax, ebx
je 0x4cf7dc
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test eax, eax
je 0x4cf84e
lock sub dword [0x592098], esi
cmp dword [ebp + 0x14], 2
jae 0x4cf882
mov ecx, 0x2000
mov dword [ebp - 0x1c], 0
xor eax, eax
inc eax
add ebx, edi
mov dl, byte [0x592094]
mov byte [ebp - 0x18], dl
mov dword [ebp - 0x14], eax
push eax
mov dword [ebp - 0x10], ecx
push ecx
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf789
cmp byte [ebp - 0x1c], 0
je 0x4cf789
mov eax, dword [ebp - 0x10]
and eax, 0x1000
je 0x4cf789
cmp byte [ebp - 0x18], 0
jne 0x4cfd88
test edi, edi
je 0x4cf7ce
mov eax, dword [ebp + 0xc]
lock add dword [0x592098], eax
mov eax, edi
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
xchg dword [0x592088], eax
xor edi, edi
test esi, esi
mov eax, dword [ebp - 0x24]
jne 0x4cf675
jmp 0x4cf8bc
call fcn.00491380
mov esi, eax
and esi, dword [ebp - 0x1c]
jmp 0x4cf5cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
xchg dword [0x592088], eax
xor edi, edi
test edi, edi
jne 0x4cf797
jmp 0x4cf69f
call dword [sym.imp.KERNEL32.dll_GetLastError]
xchg dword [0x592088], eax
call fcn.00545ff0
sub esp, 8
push dword [ebp + 0x14]
push esi
push 0
call fcn.00545d20
add esp, 0x14
mov edi, eax
test eax, eax
jne 0x4cf6f5
xor edi, edi
jmp 0x4cf797
int3
mov eax, dword [ebp - 0x20]
jmp dword [eax*4 + 0x5722d0]
mov eax, 4
jmp 0x4cf83c
mov eax, 0x40
jmp 0x4cf83c
mov bl, 1
mov eax, dword [ebp + 0x14]
jmp 0x4cf83e
mov eax, 0x20
mov bl, 1
mov ecx, 0x3000
jmp 0x4cf5fe
int3
int3
int3
mov al, 1
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x20]
jmp dword [eax*4 + 0x5722ec]
mov eax, 0x20
jmp 0x4cf878
mov eax, 4
jmp 0x4cf878
mov eax, 0x40
jmp 0x4cf878
mov eax, dword [ebp + 0x14]
mov ecx, 0x3000
jmp 0x4cf6b8
cmp dword [ebp - 0x20], 6
jbe 0x4cf88b
int3
mov al, 1
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x20]
jmp dword [eax*4 + 0x572308]
mov eax, 0x20
jmp 0x4cf8b2
mov eax, 4
jmp 0x4cf8b2
mov eax, 0x40
jmp 0x4cf8b2
mov eax, dword [ebp + 0x14]
mov ecx, 0x3000
jmp 0x4cf74c
call fcn.00545ff0
sub esp, 8
push dword [ebp + 0x14]
push dword [ebp + 0xc]
push 0
call fcn.00545d20
add esp, 0x14
mov edi, eax
test eax, eax
jne 0x4cf63f
jmp 0x4cf811
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cf8ff
cmp eax, 0x27b
jne 0x4cf7a1
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cf93d
cmp eax, 0x27b
jne 0x4cf7a1
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cf97b
cmp eax, 0x27b
jne 0x4cf7a1
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cf9b9
cmp eax, 0x27b
jne 0x4cf7a1
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cf9f7
cmp eax, 0x27b
jne 0x4cf7a1
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfa35
cmp eax, 0x27b
jne 0x4cf7a1
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfa73
cmp eax, 0x27b
jne 0x4cf7a1
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfab1
cmp eax, 0x27b
jne 0x4cf7a1
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfaef
cmp eax, 0x27b
jne 0x4cf7a1
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfb2d
cmp eax, 0x27b
jne 0x4cf7a1
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4cf7a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfb56
cmp eax, 0x27b
jne 0x4cf7e5
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf6f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfb93
cmp eax, 0x27b
jne 0x4cf7e5
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf6f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfbd0
cmp eax, 0x27b
jne 0x4cf7e5
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf6f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfc0d
cmp eax, 0x27b
jne 0x4cf7e5
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf6f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfc4a
cmp eax, 0x27b
jne 0x4cf7e5
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf6f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfc87
cmp eax, 0x27b
jne 0x4cf7e5
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf6f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfcc4
cmp eax, 0x27b
jne 0x4cf7e5
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf6f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfd01
cmp eax, 0x27b
jne 0x4cf7e5
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf6f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfd3e
cmp eax, 0x27b
jne 0x4cf7e5
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf6f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfd7b
cmp eax, 0x27b
jne 0x4cf7e5
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4cf7e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfda4
cmp eax, 0x27b
jne 0x4cf7ce
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf78d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfde2
cmp eax, 0x27b
jne 0x4cf7ce
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf78d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfe20
cmp eax, 0x27b
jne 0x4cf7ce
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf78d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfe5e
cmp eax, 0x27b
jne 0x4cf7ce
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf78d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfe9c
cmp eax, 0x27b
jne 0x4cf7ce
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf78d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cfeda
cmp eax, 0x27b
jne 0x4cf7ce
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf78d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cff18
cmp eax, 0x27b
jne 0x4cf7ce
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf78d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cff56
cmp eax, 0x27b
jne 0x4cf7ce
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf78d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cff94
cmp eax, 0x27b
jne 0x4cf7ce
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4cf78d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4cffd2
cmp eax, 0x27b
jne 0x4cf7ce
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4cf7ce