Function at 0x100517b0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100ab882
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x100dc0d8]
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 eax, dword [ebp + 8]
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x42c], eax
call fcn.10004ec0
mov ecx, eax
test ecx, ecx
je 0x10051af7
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x424], eax
push 0x100b44f8
lea ecx, [ebp - 0x424]
mov dword [ebp - 4], 0
call fcn.100108f0
test al, al
jne 0x10051837
push 0
push 0x100b44f8
lea ecx, [ebp - 0x424]
call fcn.10013610
mov dword [ebp - 4], 1
call fcn.10004ec0
mov ecx, eax
test ecx, ecx
je 0x10051b01
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x430], eax
push 0x100b44f8
lea ecx, [ebp - 0x430]
mov byte [ebp - 4], 2
call fcn.100108f0
test al, al
jne 0x10051885
push 0
push 0x100b44f8
lea ecx, [ebp - 0x430]
call fcn.10013610
mov edi, dword [ebp + 0xc]
push edi
mov byte [ebp - 4], 3
call fcn.10051ef0
mov esi, dword [0x100df950]
add esp, 4
mov edx, eax
mov eax, esi
mov ecx, dword [esi + 4]
cmp byte [ecx + 0xd], 0
jne 0x100518c5
cmp dword [ecx + 0x10], edx
jge 0x100518b2
mov ecx, dword [ecx + 8]
jmp 0x100518b6
mov eax, ecx
mov ecx, dword [ecx]
cmp byte [ecx + 0xd], 0
je 0x100518a8
cmp eax, esi
je 0x100518c5
cmp edx, dword [eax + 0x10]
jge 0x100518c7
mov eax, esi
cmp esi, eax
je 0x100518da
add eax, 0x14
lea ecx, [ebp - 0x430]
push eax
call fcn.1000e790
mov esi, dword [ebp - 0x430]
cmp dword [esi - 0xc], 0
jne 0x10051943
mov ebx, dword [ebp - 0x424]
add ebx, 0xfffffff0
push ebx
call fcn.10010940
mov ecx, dword [ebp - 0x428]
add eax, 0x10
or edi, 0xffffffff
mov byte [ebp - 4], 1
add esp, 4
add esi, 0xfffffff0
mov dword [ecx], eax
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10051921
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
lock xadd dword [ebx + 0xc], edi
dec edi
test edi, edi
jg 0x10051ad5
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x10051ad5
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.1007cdb0
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.1007cdb0
add esp, 0x18
lea eax, [ebp - 0x420]
push 0x104
push eax
push 0x10000000
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x420]
push eax
call ebx
test edi, edi
jle 0x100519a4
lea eax, [ebp - 0x420]
push eax
call ebx
sub edi, 1
jne 0x10051996
push esi
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10051a81
call fcn.10004ec0
mov ecx, eax
test ecx, ecx
je 0x10051b0b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x42c], eax
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x42c]
call fcn.100108f0
test al, al
jne 0x10051a32
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10051a10
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x42c]
call fcn.10013610
lea eax, [ebp - 0x424]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x42c]
push eax
call fcn.10041460
mov edx, dword [ebp - 0x42c]
or edi, 0xffffffff
add esp, 8
mov byte [ebp - 4], 3
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10051a70
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x424]
add ebx, 0xfffffff0
push ebx
call fcn.10010940
jmp 0x10051a93
mov ebx, dword [ebp - 0x424]
add ebx, 0xfffffff0
push ebx
call fcn.10010940
or edi, 0xffffffff
mov ecx, dword [ebp - 0x428]
add eax, 0x10
add esi, 0xfffffff0
mov byte [ebp - 4], 1
add esp, 4
mov dword [ecx], eax
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10051abc
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
lock xadd dword [ebx + 0xc], edi
dec edi
test edi, edi
jg 0x10051ad5
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x428]
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.1004ce3a
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.10004a30
push 0x80004005
call fcn.10004a30
push 0x80004005
call fcn.10004a30
int3