Function at 0x51cd90
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b3082
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x63a404]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, 2
mov dword [ebp - 0x14], 0
mov byte [ebp - 0xd], 0
call fcn.0051c800
mov ebx, eax
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x51d094
push str.config
lea ecx, [ebp - 0x30]
call fcn.005447b0
push eax
mov ecx, ebx
mov dword [ebp - 4], 0x17
call fcn.00545810
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], 0xffffffff
call fcn.004ffe40
push 0x642e80
mov ecx, ebx
call fcn.00545810
push ebx
lea ecx, [ebp - 0x28]
call fcn.005448d0
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0x1c
call fcn.00545f90
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 2
push esi
mov edi, eax
call fcn.0056ea89
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x28]
cmp edi, 0xffffffff
setne byte [ebp - 0xe]
test eax, eax
je 0x51ce5f
push 2
push eax
call fcn.0056ea89
add esp, 8
cmp byte [ebp - 0xe], 0
je 0x51d06b
mov ecx, ebx
call fcn.005475d0
mov esi, eax
mov dword [ebp - 0x24], esi
test esi, esi
je 0x51d06b
mov ecx, esi
call fcn.005313b0
mov edi, eax
mov dword [ebp - 0x1c], edi
test edi, edi
je 0x51d063
push 0x642d10
mov ecx, edi
call fcn.00534640
test eax, eax
je 0x51cf57
push 0x647b10
push 0x2c
mov ecx, eax
call fcn.00546200
mov esi, eax
mov dword [ebp - 0x14], esi
test esi, esi
je 0x51cf57
mov eax, dword [0x647b10]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0056ea97
xor edi, edi
mov dword [0x647b14], eax
add esp, 4
cmp dword [0x647b10], edi
jbe 0x51cf49
mov ebx, esi
nop
mov ecx, dword [ebx + edi*4]
push 0
call fcn.00545db0
mov ecx, dword [0x647b14]
mov dword [ecx + edi*4], eax
mov esi, dword [ebx + edi*4]
test esi, esi
je 0x51cf3a
mov eax, dword [esi]
test eax, eax
je 0x51cf21
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [esi], 0
push 8
push esi
mov dword [esi + 4], 0
call fcn.0056ea89
add esp, 8
mov dword [ebx + edi*4], 0
inc edi
cmp edi, dword [0x647b10]
jb 0x51cef0
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
push 4
push esi
call fcn.0056ea89
mov edi, dword [ebp - 0x1c]
add esp, 8
push 0x642e38
mov ecx, edi
call fcn.00534640
test eax, eax
je 0x51cf72
push eax
mov ecx, 0x647b64
call fcn.00545420
push 0x642d48
mov ecx, edi
call fcn.00534640
mov esi, eax
test esi, esi
je 0x51d041
push str.FALSE
lea ecx, [ebp - 0x40]
call fcn.005447b0
mov dword [ebp - 4], 0x1d
mov ebx, 1
push eax
mov ecx, esi
mov dword [ebp - 0x14], ebx
call fcn.00546360
test al, al
jne 0x51cffa
push 0x622a9c
lea ecx, [ebp - 0x38]
call fcn.005447b0
mov dword [ebp - 4], 0x1e
mov ebx, 3
push eax
mov ecx, esi
mov dword [ebp - 0x14], ebx
call fcn.00546360
test al, al
jne 0x51cffa
push 0x622aa0
lea ecx, [ebp - 0x20]
call fcn.005447b0
push eax
mov ecx, esi
mov ebx, 7
call fcn.00546360
mov byte [ebp - 0xd], 0
test al, al
je 0x51cffe
mov byte [ebp - 0xd], 1
test bl, 4
je 0x51d00e
lea ecx, [ebp - 0x20]
and ebx, 0xfffffffb
call fcn.004ffe40
test bl, 2
je 0x51d01b
lea ecx, [ebp - 0x38]
call fcn.004ffe40
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0xffffffff
call fcn.004ffe40
movzx eax, byte [0x63afa0]
xor ecx, ecx
cmp byte [ebp - 0xd], cl
mov ebx, dword [ebp - 0x18]
cmovne eax, ecx
mov byte [0x63afa0], al
push 0x642d00
mov ecx, edi
call fcn.00534640
test eax, eax
je 0x51d05c
push eax
mov ecx, 0x642d98
call fcn.00545420
mov esi, dword [ebp - 0x24]
mov byte [ebp - 0xd], 1
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov eax, dword [ebx]
test eax, eax
je 0x51d082
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [ebx], 0
push 8
push ebx
mov dword [ebx + 4], 0
call fcn.0056ea89
add esp, 8
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret