Function at 0x1001a660
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a9c82
mov eax, dword fs:[0]
push eax
sub esp, 0x2c0
mov eax, dword [0x100db55c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x224], ebx
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.10076710
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push dword [0x100dd7b0]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call esi
push str.Pluginextension
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1001a70e
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
cmp dword [ebx + 0x24], 0
jne 0x1001a725
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebx + 0x24], eax
push ecx
mov esi, esp
mov dword [ebp - 0x21c], esi
call fcn.10002b70
mov ecx, eax
test ecx, ecx
je 0x1001aa3d
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi], eax
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
shr eax, 0x10
mov dword [ebp - 0x22c], eax
test eax, eax
jne 0x1001a774
lea eax, [ebp - 0x218]
mov ecx, esi
movzx eax, ax
push eax
call fcn.10003520
jmp 0x1001a79e
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001a780
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.10002820
mov eax, dword [ebx]
mov ecx, ebx
mov dword [ebp - 4], 0xffffffff
call dword [eax + 0x1c]
test eax, eax
je 0x1001aa17
mov edi, dword [ebx + 0x44]
cmp edi, dword [ebx + 0x48]
je 0x1001aa17
push 0x3e8
push dword [ebx + 0x24]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1001aa17
call fcn.10002b70
test eax, eax
je 0x1001aa3d
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x220], eax
cmp dword [ebp - 0x22c], 0
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 1
jne 0x1001a81a
movzx eax, ax
lea ecx, [ebp - 0x220]
push eax
call fcn.10003520
jmp 0x1001a842
lea edx, [eax + 2]
nop dword [eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1001a820
sub eax, edx
lea ecx, [ebp - 0x220]
sar eax, 1
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.10002820
mov esi, dword [ebp - 0x220]
mov ecx, 1
mov edx, dword [edi + 4]
mov dword [ebp - 4], 2
mov dword [ebp - 0x21c], edx
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x1001a888
push 0x104
lea ecx, [ebp - 0x220]
call fcn.10002730
mov esi, dword [ebp - 0x220]
mov edx, dword [ebp - 0x21c]
cmp dword [esi - 8], 0x104
jl 0x1001aa33
push edx
xor eax, eax
mov dword [esi - 0xc], 0x104
push esi
mov word [esi + 0x208], ax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.1007dbae
add esp, 8
test eax, eax
js 0x1001aa33
cmp eax, dword [esi - 8]
jg 0x1001aa33
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
lea eax, [esi - 0x10]
push dword [ebx + 0x24]
push 0x7530
push ecx
mov ebx, esp
mov dword [ebp - 0x230], esp
mov dword [ebp - 0x21c], ebx
push eax
mov dword [ebp - 0x21c], eax
call fcn.100025a0
add eax, 0x10
mov dword [ebx], eax
mov eax, dword [edi + 8]
mov esi, esp
sub eax, 0x10
mov dword [ebp - 0x234], esp
push eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x228], esi
call fcn.100025a0
add eax, 0x10
mov dword [esi], eax
mov eax, dword [edi]
mov esi, esp
sub eax, 0x10
mov byte [ebp - 4], 4
push eax
mov dword [ebp - 0x228], esi
call fcn.100025a0
mov ebx, dword [ebp - 0x224]
add esp, 4
add eax, 0x10
mov ecx, ebx
mov dword [esi], eax
mov byte [ebp - 4], 2
call fcn.10019ea0
test eax, eax
jne 0x1001a9e9
call fcn.1005d6c0
test eax, eax
je 0x1001a9e9
call fcn.1005d6c0
mov ecx, eax
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
test al, al
je 0x1001a9e9
call fcn.1005d6c0
lea ecx, [ebp - 0x2cc]
mov ebx, eax
call fcn.10006650
mov esi, eax
push str.error_DownloadLua:
push esi
mov byte [ebp - 4], 5
call fcn.1000d200
mov ecx, dword [edi + 4]
mov edx, 0x100afe48
test ecx, ecx
cmovne edx, ecx
push edx
push esi
call fcn.1000d200
push str.Url:
push esi
call fcn.1000d200
mov eax, dword [edi]
mov ecx, 0x100afe48
test eax, eax
cmovne ecx, eax
push ecx
push esi
call fcn.1000d200
mov eax, dword [ebx]
add esp, 0x20
mov ecx, ebx
push esi
call dword [eax + 0x14]
lea ecx, [ebp - 0x2cc]
call fcn.10007360
mov ebx, dword [ebp - 0x224]
mov edx, dword [ebp - 0x21c]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1001aa0b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xc
cmp edi, dword [ebx + 0x48]
jne 0x1001a7c0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1006a7ac
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.10001810
push 0x80004005
call fcn.10001810
int3