Function at 0x4d9ec0
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 0x4da0cf
cmp edi, 8
ja 0x4da158
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 0x4da128
mov ecx, 0x2000
xor ebx, ebx
xor eax, eax
inc eax
mov dl, byte [0x5d48d0]
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 0x4d9f47
test bl, bl
je 0x4d9f47
mov eax, dword [ebp - 0x10]
and eax, 0x1000
je 0x4d9f47
cmp byte [ebp - 0x18], 0
jne 0x4da1f3
test edi, edi
je 0x4da0b1
mov eax, dword [ebp + 0xc]
lock add dword [0x5d48d4], eax
test dword [ebp - 0x28], edi
je 0x4da0a7
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test eax, eax
je 0x4da125
mov eax, dword [ebp + 0xc]
lock sub dword [0x5d48d4], 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 0x4d9ef7
mov eax, dword [ebp + 0x10]
lea esi, [eax - 0x10000]
mov dword [ebp - 0x24], esi
add esi, dword [ebp + 0xc]
jb 0x4da15b
cmp dword [ebp - 0x20], 6
jbe 0x4da161
mov ecx, 0x2000
mov dword [ebp - 0x1c], 0
xor eax, eax
inc eax
mov bl, byte [0x5d48d0]
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 0x4d9ffd
cmp byte [ebp - 0x1c], 0
je 0x4d9ffd
mov eax, dword [ebp - 0x10]
and eax, 0x1000
je 0x4d9ffd
test bl, bl
jne 0x4da44a
test edi, edi
je 0x4da0f5
lock add dword [0x5d48d4], 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 0x4da0ec
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test eax, eax
je 0x4da15e
lock sub dword [0x5d48d4], esi
cmp dword [ebp + 0x14], 2
jae 0x4da192
mov ecx, 0x2000
mov dword [ebp - 0x1c], 0
xor eax, eax
inc eax
add ebx, edi
mov dl, byte [0x5d48d0]
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 0x4da099
cmp byte [ebp - 0x1c], 0
je 0x4da099
mov eax, dword [ebp - 0x10]
and eax, 0x1000
je 0x4da099
cmp byte [ebp - 0x18], 0
jne 0x4da698
test edi, edi
je 0x4da0de
mov eax, dword [ebp + 0xc]
lock add dword [0x5d48d4], 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 [0x5d48c4], eax
xor edi, edi
test esi, esi
mov eax, dword [ebp - 0x24]
jne 0x4d9f85
jmp 0x4da1cc
call fcn.004932b0
mov esi, eax
and esi, dword [ebp - 0x1c]
jmp 0x4d9edf
call dword [sym.imp.KERNEL32.dll_GetLastError]
xchg dword [0x5d48c4], eax
xor edi, edi
test edi, edi
jne 0x4da0a7
jmp 0x4d9faf
call dword [sym.imp.KERNEL32.dll_GetLastError]
xchg dword [0x5d48c4], eax
call fcn.00556a80
sub esp, 8
push dword [ebp + 0x14]
push esi
push 0
call fcn.005567b0
add esp, 0x14
mov edi, eax
test eax, eax
jne 0x4da005
xor edi, edi
jmp 0x4da0a7
int3
mov eax, dword [ebp - 0x20]
jmp dword [eax*4 + 0x5b0570]
mov eax, 4
jmp 0x4da14c
mov eax, 0x40
jmp 0x4da14c
mov bl, 1
mov eax, dword [ebp + 0x14]
jmp 0x4da14e
mov eax, 0x20
mov bl, 1
mov ecx, 0x3000
jmp 0x4d9f0e
int3
int3
int3
mov al, 1
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x20]
jmp dword [eax*4 + 0x5b058c]
mov eax, 0x20
jmp 0x4da188
mov eax, 4
jmp 0x4da188
mov eax, 0x40
jmp 0x4da188
mov eax, dword [ebp + 0x14]
mov ecx, 0x3000
jmp 0x4d9fc8
cmp dword [ebp - 0x20], 6
jbe 0x4da19b
int3
mov al, 1
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x20]
jmp dword [eax*4 + 0x5b05a8]
mov eax, 0x20
jmp 0x4da1c2
mov eax, 4
jmp 0x4da1c2
mov eax, 0x40
jmp 0x4da1c2
mov eax, dword [ebp + 0x14]
mov ecx, 0x3000
jmp 0x4da05c
call fcn.00556a80
sub esp, 8
push dword [ebp + 0x14]
push dword [ebp + 0xc]
push 0
call fcn.005567b0
add esp, 0x14
mov edi, eax
test eax, eax
jne 0x4d9f4f
jmp 0x4da121
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da20f
cmp eax, 0x27b
jne 0x4da0b1
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 0x4d9f4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da24d
cmp eax, 0x27b
jne 0x4da0b1
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 0x4d9f4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da28b
cmp eax, 0x27b
jne 0x4da0b1
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 0x4d9f4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da2c9
cmp eax, 0x27b
jne 0x4da0b1
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 0x4d9f4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da307
cmp eax, 0x27b
jne 0x4da0b1
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 0x4d9f4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da345
cmp eax, 0x27b
jne 0x4da0b1
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 0x4d9f4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da383
cmp eax, 0x27b
jne 0x4da0b1
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 0x4d9f4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da3c1
cmp eax, 0x27b
jne 0x4da0b1
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 0x4d9f4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da3ff
cmp eax, 0x27b
jne 0x4da0b1
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 0x4d9f4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da43d
cmp eax, 0x27b
jne 0x4da0b1
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4da0b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da466
cmp eax, 0x27b
jne 0x4da0f5
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 0x4da005
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da4a3
cmp eax, 0x27b
jne 0x4da0f5
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 0x4da005
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da4e0
cmp eax, 0x27b
jne 0x4da0f5
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 0x4da005
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da51d
cmp eax, 0x27b
jne 0x4da0f5
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 0x4da005
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da55a
cmp eax, 0x27b
jne 0x4da0f5
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 0x4da005
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da597
cmp eax, 0x27b
jne 0x4da0f5
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 0x4da005
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da5d4
cmp eax, 0x27b
jne 0x4da0f5
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 0x4da005
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da611
cmp eax, 0x27b
jne 0x4da0f5
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 0x4da005
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da64e
cmp eax, 0x27b
jne 0x4da0f5
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 0x4da005
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da68b
cmp eax, 0x27b
jne 0x4da0f5
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4da0f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da6b4
cmp eax, 0x27b
jne 0x4da0de
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 0x4da09d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da6f2
cmp eax, 0x27b
jne 0x4da0de
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 0x4da09d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da730
cmp eax, 0x27b
jne 0x4da0de
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 0x4da09d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da76e
cmp eax, 0x27b
jne 0x4da0de
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 0x4da09d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da7ac
cmp eax, 0x27b
jne 0x4da0de
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 0x4da09d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da7ea
cmp eax, 0x27b
jne 0x4da0de
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 0x4da09d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da828
cmp eax, 0x27b
jne 0x4da0de
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 0x4da09d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da866
cmp eax, 0x27b
jne 0x4da0de
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 0x4da09d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da8a4
cmp eax, 0x27b
jne 0x4da0de
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 0x4da09d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4da8e2
cmp eax, 0x27b
jne 0x4da0de
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4da0de