Function at 0x416160
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
mov edi, dword [ebp + 0x18]
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov eax, ebx
neg eax
mov dword [ebp - 0x14], eax
test esi, esi
je 0x416348
lea eax, [ebx - 1]
mov dword [ebp - 0x28], eax
xor eax, eax
test edi, edi
setne al
or eax, 2
shl eax, 0xc
mov cl, 1
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x10], eax
and eax, 0x1000
mov dword [ebp - 0x2c], eax
lea eax, [edi - 1]
mov dword [ebp - 0x24], eax
cmp eax, 5
jbe 0x41638f
mov dword [ebp - 0x1c], 0
xor ecx, ecx
inc ecx
mov bl, byte [0x46e4a0]
mov dword [ebp - 0x18], ecx
push ecx
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4161ee
test bl, bl
je 0x4161ee
cmp byte [ebp - 0x1c], 0
je 0x4161ee
cmp dword [ebp - 0x2c], 0
jne 0x4163ba
test edi, edi
je 0x41620f
mov eax, dword [ebp + 0xc]
lock add dword [0x46e4a4], eax
mov eax, edi
and eax, dword [ebp - 0x28]
cmp eax, dword [ebp + 0x14]
je 0x416385
jmp 0x41635a
call dword [sym.imp.KERNEL32.dll_GetLastError]
xchg dword [0x46e494], eax
xor edi, edi
test esi, esi
je 0x416620
add edi, dword [ebp - 0x28]
and edi, dword [ebp - 0x14]
add edi, dword [ebp + 0x14]
mov esi, edi
test byte [ebp - 0x20], 1
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x24]
jne 0x4161aa
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
lea esi, [ecx + eax]
add esi, 0xffff0000
cmp esi, ecx
jb 0x416665
add eax, 0xffff0000
mov dword [ebp - 0x1c], eax
xor eax, eax
inc eax
cmp dword [ebp - 0x24], 5
jbe 0x416647
mov dword [ebp - 0x20], 0
mov ecx, eax
mov bl, byte [0x46e4a0]
mov dword [ebp - 0x14], ecx
push ecx
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4162a9
test bl, bl
je 0x4162a9
cmp byte [ebp - 0x20], 0
je 0x4162a9
cmp dword [ebp - 0x2c], 0
jne 0x41666b
test edi, edi
je 0x416318
lock add dword [0x46e4a4], esi
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 ebx, [ecx + eax]
mov eax, dword [ebp - 0x1c]
sub eax, ebx
or eax, ebx
je 0x416385
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test eax, eax
je 0x416668
add ebx, edi
lock sub dword [0x46e4a4], esi
sub esp, 8
push dword [ebp + 0x18]
push dword [ebp + 0xc]
push ebx
call fcn.0040d030
add esp, 0x14
mov edi, eax
test eax, eax
mov eax, 1
jne 0x41637b
jmp 0x416266
call dword [sym.imp.KERNEL32.dll_GetLastError]
xchg dword [0x46e494], eax
call fcn.0044da80
sub esp, 8
push dword [ebp + 0x18]
push esi
push 0
call fcn.0040d030
add esp, 0x14
mov edi, eax
test eax, eax
jne 0x4162ad
xor edi, edi
jmp 0x416385
call fcn.0040d440
mov esi, eax
and esi, dword [ebp - 0x14]
add esi, dword [ebp + 0x14]
jmp 0x416181
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test eax, eax
je 0x4163ad
mov eax, dword [ebp + 0xc]
lock sub dword [0x46e4a4], eax
jmp 0x416225
mov eax, dword [ebp + 0xc]
lock add dword [0x46e4a4], eax
mov eax, edi
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, 2
mov al, 1
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x24]
jmp dword [eax*4 + 0x458c34]
mov ecx, 4
jmp 0x416616
int3
mov ecx, 0x20
jmp 0x416616
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4163d6
cmp eax, 0x27b
jne 0x41620f
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4161f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x416414
cmp eax, 0x27b
jne 0x41620f
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4161f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x416452
cmp eax, 0x27b
jne 0x41620f
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4161f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x416490
cmp eax, 0x27b
jne 0x41620f
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4161f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4164ce
cmp eax, 0x27b
jne 0x41620f
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4161f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x41650c
cmp eax, 0x27b
jne 0x41620f
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4161f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x41654a
cmp eax, 0x27b
jne 0x41620f
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4161f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x416588
cmp eax, 0x27b
jne 0x41620f
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4161f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4165c6
cmp eax, 0x27b
jne 0x41620f
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4161f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x416604
cmp eax, 0x27b
jne 0x41620f
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x41620f
mov ecx, 0x40
mov al, 1
mov dword [ebp - 0x1c], eax
jmp case.0x41639c.1
call fcn.0044da80
sub esp, 8
push dword [ebp + 0x18]
push dword [ebp + 0xc]
push 0
call fcn.0040d030
add esp, 0x14
mov edi, eax
test eax, eax
jne 0x4161f2
jmp 0x416344
mov ecx, 2
mov al, 1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x24]
jmp dword [eax*4 + 0x458c4c]
mov ecx, 4
jmp case.0x416654.0
int3
int3
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x416687
cmp eax, 0x27b
jne 0x416318
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4162ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4166c4
cmp eax, 0x27b
jne 0x416318
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4162ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x416701
cmp eax, 0x27b
jne 0x416318
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4162ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x41673e
cmp eax, 0x27b
jne 0x416318
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4162ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x41677b
cmp eax, 0x27b
jne 0x416318
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4162ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4167b8
cmp eax, 0x27b
jne 0x416318
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4162ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4167f5
cmp eax, 0x27b
jne 0x416318
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4162ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x416832
cmp eax, 0x27b
jne 0x416318
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4162ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x41686f
cmp eax, 0x27b
jne 0x416318
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test eax, eax
jne 0x4162ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 0x5ae]
cmp ecx, 2
jb 0x4168ac
cmp eax, 0x27b
jne 0x416318
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x416318
mov ecx, 0x20
jmp case.0x416654.0
mov ecx, 0x40
jmp case.0x416654.0