Function at 0x4015c0
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x419648
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x421030]
xor eax, esp
mov dword [esp + 0x218], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x421030]
xor eax, esp
push eax
lea eax, [esp + 0x230]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x240]
mov eax, dword [ebp]
xor esi, esi
cmp dword [eax - 0xc], esi
je 0x401a28
mov edx, dword [0x422b74]
mov eax, dword [edx + 0xc]
mov ecx, 0x422b74
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov dword [esp + 0x238], esi
mov edx, dword [0x422b74]
mov eax, dword [edx + 0xc]
mov ecx, 0x422b74
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
mov byte [esp + 0x238], 1
cmp dword [ebx - 0xc], esi
jne 0x40169b
mov eax, dword [ebp]
cmp dword [eax - 0xc], esi
jl 0x40169b
push 0x41bd0c
push eax
call fcn.0040ab78
add esp, 8
cmp eax, esi
je 0x40169b
sub eax, dword [ebp]
sar eax, 1
cmp eax, 1
jne 0x40169b
mov eax, ebp
lea edi, [esp + 0x18]
call fcn.00401b10
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40169b
mov esi, edi
call fcn.004022e0
mov ebx, dword [esp + 0x18]
mov eax, dword [ebx - 0xc]
test eax, eax
jne 0x4017c3
cmp dword [esp + 0x244], eax
jne 0x4017c3
push 0x20a
push eax
lea ecx, [esp + 0x2a]
push ecx
mov word [esp + 0x2c], ax
call fcn.0040bb20
add esp, 0xc
push 0x104
lea edx, [esp + 0x24]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x20]
lea edi, [esp + 0x14]
call fcn.00402360
mov esi, dword [esp + 0x14]
push 0x5c
push esi
call fcn.0040abd6
add esp, 8
test eax, eax
je 0x401749
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x401749
add eax, 1
lea ecx, [esp + 0x1c]
mov edx, edi
call fcn.00401b70
mov byte [esp + 0x238], 2
call fcn.00401b10
mov byte [esp + 0x238], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401749
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
cmp dword [ecx - 0xc], 0
je 0x4017c3
lea eax, [esp + 0x14]
call fcn.004013c0
lea edx, [esp + 0x1c]
push ebp
push edx
lea ebx, [esp + 0x1c]
call fcn.00401be0
add esp, 8
lea edi, [esp + 0x18]
mov byte [esp + 0x238], 3
call fcn.00401b10
mov byte [esp + 0x238], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4017a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4017c3
lea esi, [esp + 0x18]
call fcn.004022e0
mov ebx, dword [esp + 0x18]
cmp dword [ebx - 0xc], 0
jne 0x4019b5
lea esi, [esp + 0x14]
call fcn.004022e0
lea esi, [esp + 0x1c]
call fcn.00401400
lea edi, [esp + 0x14]
mov byte [esp + 0x238], 4
call fcn.00401b10
mov byte [esp + 0x238], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401818
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x4018ba
jle 0x401853
lea ecx, [eax - 1]
test ecx, ecx
jl 0x401a52
cmp ecx, eax
jg 0x401a52
mov edx, dword [esp + 0x14]
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x401853
lea edi, [esp + 0x14]
call fcn.004023a0
lea eax, [esp + 0x1c]
push ebp
push eax
lea ebx, [esp + 0x1c]
call fcn.00401be0
add esp, 8
lea edi, [esp + 0x18]
mov byte [esp + 0x238], 5
call fcn.00401b10
mov byte [esp + 0x238], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40189e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4018ba
lea esi, [esp + 0x18]
call fcn.004022e0
mov ebx, dword [esp + 0x18]
cmp dword [ebx - 0xc], 0
jne 0x4019b5
lea esi, [esp + 0x14]
call fcn.004022e0
lea esi, [esp + 0x1c]
call fcn.004014e0
lea edi, [esp + 0x14]
mov byte [esp + 0x238], 6
call fcn.00401b10
mov byte [esp + 0x238], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40190f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x4019b1
jle 0x40194a
lea ecx, [eax - 1]
test ecx, ecx
jl 0x401a52
cmp ecx, eax
jg 0x401a52
mov edx, dword [esp + 0x14]
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x40194a
lea edi, [esp + 0x14]
call fcn.004023a0
lea eax, [esp + 0x1c]
push ebp
push eax
lea ebx, [esp + 0x1c]
call fcn.00401be0
add esp, 8
lea edi, [esp + 0x18]
mov byte [esp + 0x238], 7
call fcn.00401b10
mov byte [esp + 0x238], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401995
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4019b1
lea esi, [esp + 0x18]
call fcn.004022e0
mov ebx, dword [esp + 0x18]
cmp dword [ebx - 0xc], 0
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
je 0x4019d1
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4019d1
push ebx
call edi
mov esi, eax
test esi, esi
jne 0x4019d9
mov eax, dword [ebp]
push eax
call edi
mov esi, eax
lea eax, [ebx - 0x10]
mov byte [esp + 0x238], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4019fd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x238], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401a28
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x230]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.0040a953
add esp, 0x228
ret
push 0x80070057
call fcn.00401f50
int3