Function at 0x45e970
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x508f10
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5364d0]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x50]
mov esi, dword [esp + 0x4c]
add esi, 0xa8
mov eax, esi
mov dword [esp + 0x2c], esi
call fcn.00474290
push esi
call fcn.00474300
call fcn.004345d0
mov edi, eax
xor ebx, ebx
mov dword [edi + 0x34], 1
cmp dword [edi + 0x80], ebx
je 0x45e9da
mov eax, dword [edi + 0x60]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [edi + 0x2c], ebx
mov dword [esi + 0x2c], ebx
mov edx, dword [0x563288]
mov eax, dword [edx + 0xc]
mov ecx, 0x563288
mov dword [esp + 0x20], ebx
call eax
add eax, 0x10
mov dword [esp + 0x50], eax
mov dword [esp + 0x44], ebx
mov edx, dword [0x563288]
mov eax, dword [edx + 0xc]
mov ecx, 0x563288
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x44], 1
mov edx, dword [0x563288]
mov eax, dword [edx + 0xc]
mov ecx, 0x563288
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0x4c]
add ebx, 0x51e4
mov byte [esp + 0x44], 2
mov eax, dword [ebx]
test eax, eax
je 0x45ea8c
mov ecx, dword [eax]
mov edx, dword [ecx + 0x7c]
push eax
call edx
add eax, 4
jne 0x45ea63
xor ecx, ecx
push ecx
push eax
lea eax, [esp + 0x24]
call fcn.00401560
jmp 0x45eacc
mov ecx, eax
lea edi, [ecx + 2]
jmp 0x45ea70
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x45ea70
sub ecx, edi
sar ecx, 1
push ecx
push eax
lea eax, [esp + 0x24]
call fcn.00401560
jmp 0x45eacc
cmp dword [ebp], 6
jne 0x45eacc
mov eax, dword [ebp + 0x3c]
sub eax, dword [ebp + 0x38]
sar eax, 2
test eax, eax
jbe 0x45eacc
mov ecx, dword [ebp + 0x3c]
sub ecx, dword [ebp + 0x38]
sar ecx, 2
test ecx, ecx
ja 0x45eab1
call fcn.004e48f7
mov edx, dword [ebp + 0x38]
mov eax, dword [edx]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x7c]
push eax
call edx
mov edx, eax
add edx, 4
lea edi, [esp + 0x1c]
call fcn.00401600
mov edi, dword [esp + 0x1c]
push 0x50fd60
push edi
call fcn.004e4707
add esp, 8
test eax, eax
jne 0x45ebad
cmp dword [esp + 0x54], eax
je 0x45eb71
mov ecx, dword [esp + 0x4c]
push ebp
call fcn.0045ef20
mov esi, eax
lea eax, [edi - 0x10]
mov byte [esp + 0x44], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45eb1d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x44], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45eb42
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x44], 0xffffffff
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45eb6a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
jmp 0x45eeee
cmp dword [ebp], 6
mov dword [esp + 0x20], 1
je 0x45ebad
mov eax, dword [ebx]
test eax, eax
je 0x45ebad
mov ecx, dword [eax]
mov edx, dword [ecx + 0x6c]
push eax
call edx
mov edx, eax
lea edi, [esp + 0x50]
call fcn.00401600
mov eax, dword [ebx]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x74]
push eax
call edx
mov edx, eax
lea edi, [esp + 0x18]
call fcn.00401600
push 0
call fcn.004b1ee0
mov edi, eax
mov eax, dword [ebp]
add esp, 4
cmp eax, 5
ja case.default.0x45ebc5
jmp dword [eax*4 + 0x45ef04]
add ebp, 0x24
cmp dword [ebp], 0xffffffff
jne 0x45ebf5
lea ecx, [esp + 0x1c]
call fcn.004016f0
lea ecx, [esp + 0x18]
call fcn.004016f0
lea ecx, [esp + 0x50]
call fcn.004016f0
jmp 0x45eeec
mov esi, dword [esp + 0x4c]
push ebp
lea eax, [esp + 0x34]
push eax
lea edi, [esi + 0x4ed0]
call fcn.004744c0
push esi
lea ecx, [esp + 0x34]
call fcn.0045f930
lea ecx, [esp + 0x1c]
mov esi, eax
call fcn.004016f0
lea ecx, [esp + 0x18]
call fcn.004016f0
lea ecx, [esp + 0x50]
call fcn.004016f0
mov eax, esi
jmp 0x45eeee
mov ecx, dword [ebp + 0x18]
sub ecx, dword [ebp + 0x14]
sar ecx, 2
test ecx, ecx
ja 0x45ec4a
call fcn.004e48f7
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x20]
lea edx, [esp + 0x54]
push edx
mov edx, eax
call fcn.00486640
add esp, 4
mov byte [esp + 0x44], 3
mov eax, dword [ebp + 0x44]
mov esi, dword [ebx]
mov ecx, dword [esp + 0x54]
push eax
push edi
call fcn.0049a520
lea ecx, [esp + 0x54]
mov esi, eax
mov byte [esp + 0x44], 2
call fcn.004016f0
jmp 0x45ecf9
mov ecx, dword [ebp + 0x18]
sub ecx, dword [ebp + 0x14]
sar ecx, 2
cmp ecx, 2
ja 0x45ec9b
call fcn.004e48f7
mov edx, dword [ebp + 0x18]
sub edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x14]
mov esi, dword [eax + 8]
add eax, 8
sar edx, 2
cmp edx, 1
ja 0x45ecb7
call fcn.004e48f7
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x44]
mov ecx, dword [ebx]
push edx
add eax, 4
mov eax, dword [eax]
push esi
push eax
push edi
call fcn.0049a340
jmp 0x45ecf7
mov ecx, dword [ebp + 0x44]
mov eax, dword [ebx]
push ecx
lea edx, [ebp + 8]
push edx
push eax
push edi
call fcn.0049a050
jmp 0x45ecf7
mov edx, dword [ebp + 0x44]
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebx]
push edx
push eax
lea eax, [ebp + 8]
push eax
push ecx
push edi
call fcn.00499920
mov esi, eax
test esi, esi
je 0x45ede0
mov esi, dword [esp + 0x4c]
mov edx, dword [edi]
mov eax, dword [esi + 4]
mov edx, dword [edx + 0x2c]
push eax
mov ecx, edi
call edx
cmp dword [esp + 0x20], 0
mov dword [esp + 0x28], eax
je 0x45edcb
cmp dword [ebp], 3
jne 0x45edae
mov eax, dword [esp + 0x50]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45ed46
mov ecx, esi
call fcn.0046d8b0
jmp 0x45edcb
push ecx
mov eax, ebx
mov esi, esp
xor ebp, ebp
mov dword [esp + 0x28], esp
call fcn.0041eca0
mov esi, dword [esp + 0x50]
lea edx, [esi + 0x51f0]
mov dword [esp + 0x28], edx
call fcn.0044d2e0
cmp eax, 1
jne 0x45ed70
mov ebp, eax
mov eax, dword [esp + 0x18]
mov edx, dword [esi + 0xa4]
mov edx, dword [edx + 0x24]
push 0
lea ecx, [esi + 0xa4]
push eax
mov eax, dword [esp + 0x58]
push eax
call edx
test ebp, ebp
je 0x45edcb
push ecx
mov eax, ebx
mov esi, esp
mov dword [esp + 0x34], esp
call fcn.0041eca0
mov esi, dword [esp + 0x28]
call fcn.0044d290
mov esi, dword [esp + 0x4c]
jmp 0x45edcb
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 0xa4]
mov eax, dword [eax + 0x24]
push 0
lea ecx, [esi + 0xa4]
push edx
mov edx, dword [esp + 0x58]
push edx
call eax
cmp dword [esp + 0x28], 1
jne 0x45ede0
cmp dword [esp + 0x20], 0
jne 0x45ede0
mov ecx, esi
call fcn.0046ddb0
test edi, edi
je 0x45edef
mov edx, dword [edi]
mov eax, dword [edx + 0x28]
push 1
mov ecx, edi
call eax
mov ecx, dword [esp + 0x2c]
mov byte [esp + 0x44], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [ecx + 0x2c], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x45ee1f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x44], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45ee44
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x44], 0xffffffff
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45ee6c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x45eeee
mov byte [esp + 0x44], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esi + 0x2c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45ee9f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x44], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45eec4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x44], 0xffffffff
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45eeec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 0xc