Function at 0x412020
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov edi, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
neg eax
mov dword [ebp - 0x10], eax
test esi, esi
je 0x4120c9
cmp edi, 7
ja 0x4125d2
mov eax, dword [ebp + 0x10]
dec eax
mov dword [ebp - 0x28], eax
mov al, 1
mov dword [ebp - 0x18], eax
lea eax, [edi - 2]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 5
jbe 0x4125d5
mov ecx, 0x2000
xor ebx, ebx
xor eax, eax
inc eax
mov dl, byte [0x4dd36c]
mov byte [ebp - 0x20], dl
mov dword [ebp - 0x14], eax
push eax
mov dword [ebp - 0x1c], ecx
push ecx
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4120a7
test bl, bl
je 0x4120a7
mov eax, dword [ebp - 0x1c]
and eax, 0x1000
je 0x4120a7
cmp byte [ebp - 0x20], 0
jne 0x41260b
test edi, edi
je 0x4120fd
mov eax, dword [ebp + 0xc]
lock add dword [0x4dd370], eax
mov eax, edi
and eax, dword [ebp - 0x28]
cmp eax, dword [ebp + 0x14]
jne 0x4120db
mov eax, edi
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.00438ee0
mov esi, eax
and esi, dword [ebp - 0x10]
add esi, dword [ebp + 0x14]
jmp 0x41203f
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test eax, eax
je 0x4125cf
mov eax, dword [ebp + 0xc]
lock sub dword [0x4dd370], eax
jmp 0x412113
call dword [sym.imp.KERNEL32.dll_GetLastError]
xchg dword [0x4dd360], eax
xor edi, edi
test esi, esi
je 0x4122a6
add edi, dword [ebp - 0x28]
and edi, dword [ebp - 0x10]
add edi, dword [ebp + 0x14]
mov esi, edi
test byte [ebp - 0x18], 1
mov dword [ebp - 0x18], 0
jne 0x41205a
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
lea edx, [ecx + eax]
add edx, 0xffff0000
mov dword [ebp - 0x18], edx
cmp edx, ecx
jb 0x412608
add eax, 0xffff0000
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x24], 5
jbe 0x4122d4
mov esi, 0x2000
mov dword [ebp - 0x20], 0
xor eax, eax
inc eax
mov bl, byte [0x4dd36c]
mov dword [ebp - 0x10], eax
push eax
push esi
push dword [ebp - 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x41219d
cmp byte [ebp - 0x20], 0
je 0x41219d
mov eax, esi
and eax, 0x1000
je 0x41219d
test bl, bl
jne 0x412381
test edi, edi
je 0x412271
mov eax, dword [ebp - 0x18]
lock add dword [0x4dd370], eax
mov eax, edi
and eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x14]
sub ecx, eax
mov eax, 0
cmovb eax, dword [ebp + 0x10]
lea esi, [ecx + eax]
mov eax, dword [ebp - 0x1c]
sub eax, esi
or eax, esi
je 0x412264
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test eax, eax
je 0x412605
mov eax, dword [ebp - 0x18]
lock sub dword [0x4dd370], eax
cmp dword [ebp + 0x18], 2
jae 0x412304
mov ecx, 0x2000
mov dword [ebp - 0x20], 0
xor eax, eax
inc eax
add esi, edi
mov bl, byte [0x4dd36c]
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 0x412243
cmp byte [ebp - 0x20], 0
je 0x412243
mov eax, dword [ebp - 0x10]
and eax, 0x1000
je 0x412243
test bl, bl
jne 0x41233e
test edi, edi
je 0x412256
mov eax, dword [ebp + 0xc]
lock add dword [0x4dd370], eax
jmp 0x4120bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
xchg dword [0x4dd360], eax
xor edi, edi
test edi, edi
jne 0x4120bf
jmp 0x412151
call dword [sym.imp.KERNEL32.dll_GetLastError]
xchg dword [0x4dd360], eax
call fcn.0048cef0
sub esp, 8
push dword [ebp + 0x18]
push dword [ebp - 0x18]
push 0
call fcn.0048cc20
add esp, 0x14
mov edi, eax
test eax, eax
jne 0x4121a5
xor edi, edi
jmp 0x4120bf
call fcn.0048cef0
sub esp, 8
push dword [ebp + 0x18]
push dword [ebp + 0xc]
push 0
call fcn.0048cc20
add esp, 0x14
mov edi, eax
test eax, eax
jne 0x4120ab
jmp 0x41229f
mov eax, 0x40
jmp 0x41216a
mov al, 1
mov dword [ebp - 0x20], eax
mov esi, 0x3000
mov eax, dword [ebp - 0x24]
jmp dword [eax*4 + 0x4bd458]
mov eax, dword [ebp + 0x18]
jmp 0x41216a
mov eax, 4
jmp 0x41216a
mov eax, 0x20
jmp 0x41216a
cmp dword [ebp - 0x24], 5
jbe 0x41230d
int3
mov al, 1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x24]
jmp dword [eax*4 + 0x4bd470]
mov eax, dword [ebp + 0x18]
mov ecx, 0x3000
jmp 0x41220b
mov eax, 0x40
jmp 0x41231f
mov eax, 4
jmp 0x41231f
mov eax, 0x20
jmp 0x41231f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x41235a
cmp eax, 0x27b
jne 0x412256
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 0x412247
jmp 0x412862
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x41239d
cmp eax, 0x27b
jne 0x412271
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x10]
push esi
push dword [ebp - 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4121a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4123da
cmp eax, 0x27b
jne 0x412271
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x10]
push esi
push dword [ebp - 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4121a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412417
cmp eax, 0x27b
jne 0x412271
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x10]
push esi
push dword [ebp - 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4121a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412454
cmp eax, 0x27b
jne 0x412271
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x10]
push esi
push dword [ebp - 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4121a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412491
cmp eax, 0x27b
jne 0x412271
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x10]
push esi
push dword [ebp - 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4121a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4124ce
cmp eax, 0x27b
jne 0x412271
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x10]
push esi
push dword [ebp - 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4121a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x41250b
cmp eax, 0x27b
jne 0x412271
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x10]
push esi
push dword [ebp - 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4121a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412548
cmp eax, 0x27b
jne 0x412271
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x10]
push esi
push dword [ebp - 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4121a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412585
cmp eax, 0x27b
jne 0x412271
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x10]
push esi
push dword [ebp - 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4121a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4125c2
cmp eax, 0x27b
jne 0x412271
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x412271
int3
int3
mov eax, dword [ebp - 0x24]
jmp dword [eax*4 + 0x4bd440]
mov eax, 4
jmp 0x4125f9
mov eax, 0x40
jmp 0x4125f9
mov bl, 1
mov eax, dword [ebp + 0x18]
jmp 0x4125fb
mov eax, 0x20
mov bl, 1
mov ecx, 0x3000
jmp 0x41206e
int3
int3
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412627
cmp eax, 0x27b
jne 0x4120fd
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4120ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412665
cmp eax, 0x27b
jne 0x4120fd
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4120ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4126a3
cmp eax, 0x27b
jne 0x4120fd
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4120ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4126e1
cmp eax, 0x27b
jne 0x4120fd
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4120ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x41271f
cmp eax, 0x27b
jne 0x4120fd
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4120ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x41275d
cmp eax, 0x27b
jne 0x4120fd
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4120ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x41279b
cmp eax, 0x27b
jne 0x4120fd
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4120ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4127d9
cmp eax, 0x27b
jne 0x4120fd
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4120ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412817
cmp eax, 0x27b
jne 0x4120fd
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4120ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412855
cmp eax, 0x27b
jne 0x4120fd
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4120fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x41287e
cmp eax, 0x27b
jne 0x412256
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 0x412247
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4128bc
cmp eax, 0x27b
jne 0x412256
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 0x412247
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4128fa
cmp eax, 0x27b
jne 0x412256
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 0x412247
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412938
cmp eax, 0x27b
jne 0x412256
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 0x412247
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412976
cmp eax, 0x27b
jne 0x412256
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 0x412247
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4129b4
cmp eax, 0x27b
jne 0x412256
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 0x412247
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4129f2
cmp eax, 0x27b
jne 0x412256
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 0x412247
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412a30
cmp eax, 0x27b
jne 0x412256
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 0x412247
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x412a6e
cmp eax, 0x27b
jne 0x412256
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x412256