Function at 0x505dd0
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x515cc6
mov eax, dword fs:[0]
push eax
sub esp, 0x28c
mov eax, dword [0x55c640]
xor eax, esp
mov dword [esp + 0x288], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x55c640]
xor eax, esp
push eax
lea eax, [esp + 0x2a0]
mov dword fs:[0], eax
mov ecx, dword [esp + 0x2bc]
mov eax, dword [esp + 0x2b4]
mov esi, dword [esp + 0x2b0]
mov edi, dword [esp + 0x2c0]
mov ebx, dword [esp + 0x2c4]
mov dword [esp + 0x18], ecx
xor ecx, ecx
push 0xffffffffffffffff
push ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x2c0]
mov word [esp + 0x24], cx
lea ecx, [esp + 0x24]
push eax
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], 0
call fcn.00451bc0
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x2a8], 0
test ebp, ebp
je 0x505eb9
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x1c]
mov edx, dword [esp + 0x1c]
cmp ecx, 8
cmovae eax, edx
cmp word [eax + ebp*2 - 2], 0x5c
je 0x505eb2
cmp ecx, 8
lea eax, [esp + 0x1c]
cmovae eax, edx
cmp word [eax + ebp*2 - 2], 0x2f
je 0x505eb2
cmp ecx, 8
lea eax, [esp + 0x1c]
cmovae eax, edx
cmp word [eax + ebp*2 - 2], 0x3a
jne 0x505eb9
mov edx, 0x53ded0
jmp 0x505ebe
mov edx, 0x53dec8
mov ecx, edx
lea ebp, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x505ec3
sub ecx, ebp
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x24]
call fcn.00454950
cmp dword [esp + 0x30], 8
lea ecx, [esp + 0x4c]
lea eax, [esp + 0x1c]
cmovae eax, dword [esp + 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ecx, dword [esp + 0x14]
mov dword [ecx], eax
cmp eax, 0xffffffff
jne 0x505f6d
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ecx], 0
call edi
cmp eax, 2
je 0x505f22
call edi
cmp eax, 0x12
je 0x505f22
call edi
mov ecx, eax
jmp 0x505f24
xor ecx, ecx
mov eax, dword [0x567df8]
test al, 1
jne 0x505f53
or eax, 1
mov dword [0x567de8], 0x25c5e09b
mov dword [0x567df8], eax
mov dword [0x567dec], 0x8fafd21e
mov dword [0x567de0], 0x53dd00
mov dword [esi], ecx
mov eax, dword [0x567de0]
push ecx
mov ecx, 0x567de0
mov eax, dword [eax + 0x18]
call eax
mov byte [esi + 4], al
jmp 0x506051
cmp word [esp + 0x78], 0
jne 0x505f79
xor ecx, ecx
jmp 0x505f8f
lea ecx, [esp + 0x78]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x505f80
sub ecx, edx
sar ecx, 1
push ecx
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x7c]
push eax
call fcn.00454a30
mov eax, dword [esp + 0x4c]
test eax, 0x400
je 0x505fb7
mov dword [edi], 0
mov dword [ebx], 0
jmp 0x506018
test al, 0x10
je 0x505fc9
mov dword [edi], 3
mov dword [ebx], 3
jmp 0x505fd5
mov dword [edi], 2
mov dword [ebx], 2
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x38]
call fcn.00505410
push dword [esp + 0x4c]
lea eax, [esp + 0x38]
mov byte [esp + 0x2ac], 1
push eax
call fcn.00507060
add esp, 8
mov dword [edi + 4], eax
cmp dword [esp + 0x48], 8
jb 0x506012
push dword [esp + 0x34]
call fcn.00485250
add esp, 4
mov eax, dword [edi + 4]
mov dword [ebx + 4], eax
mov dword [esi], 0
mov byte [esi + 4], 0
mov eax, dword [0x567df8]
test al, 1
jne 0x506051
or eax, 1
mov dword [0x567de8], 0x25c5e09b
mov dword [0x567df8], eax
mov dword [0x567dec], 0x8fafd21e
mov dword [0x567de0], 0x53dd00
cmp dword [esp + 0x30], 8
mov dword [esi + 8], 0x567de0
jb 0x50606b
push dword [esp + 0x1c]
call fcn.00485250
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x2a0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x288]
xor ecx, esp
call fcn.00484516
add esp, 0x298
ret