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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b3ea2
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x63b404]
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.0051d5f0
mov ebx, eax
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x51de84
push str.config
lea ecx, [ebp - 0x30]
call fcn.005455a0
push eax
mov ecx, ebx
mov dword [ebp - 4], 0x17
call fcn.00546600
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], 0xffffffff
call fcn.00500b70
push 0x643fa0
mov ecx, ebx
call fcn.00546600
push ebx
lea ecx, [ebp - 0x28]
call fcn.005456c0
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0x1c
call fcn.00546d80
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 2
push esi
mov edi, eax
call fcn.0056f898
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x28]
cmp edi, 0xffffffff
setne byte [ebp - 0xe]
test eax, eax
je 0x51dc4f
push 2
push eax
call fcn.0056f898
add esp, 8
cmp byte [ebp - 0xe], 0
je 0x51de5b
mov ecx, ebx
call fcn.005483c0
mov esi, eax
mov dword [ebp - 0x24], esi
test esi, esi
je 0x51de5b
mov ecx, esi
call fcn.005321a0
mov edi, eax
mov dword [ebp - 0x1c], edi
test edi, edi
je 0x51de53
push 0x643e30
mov ecx, edi
call fcn.00535430
test eax, eax
je 0x51dd47
push 0x648c30
push 0x2c
mov ecx, eax
call fcn.00546ff0
mov esi, eax
mov dword [ebp - 0x14], esi
test esi, esi
je 0x51dd47
mov eax, dword [0x648c30]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0056f8a6
xor edi, edi
mov dword [0x648c34], eax
add esp, 4
cmp dword [0x648c30], edi
jbe 0x51dd39
mov ebx, esi
nop
mov ecx, dword [ebx + edi*4]
push 0
call fcn.00546ba0
mov ecx, dword [0x648c34]
mov dword [ecx + edi*4], eax
mov esi, dword [ebx + edi*4]
test esi, esi
je 0x51dd2a
mov eax, dword [esi]
test eax, eax
je 0x51dd11
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [esi], 0
push 8
push esi
mov dword [esi + 4], 0
call fcn.0056f898
add esp, 8
mov dword [ebx + edi*4], 0
inc edi
cmp edi, dword [0x648c30]
jb 0x51dce0
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
push 4
push esi
call fcn.0056f898
mov edi, dword [ebp - 0x1c]
add esp, 8
push 0x643f58
mov ecx, edi
call fcn.00535430
test eax, eax
je 0x51dd62
push eax
mov ecx, 0x648c84
call fcn.00546210
push 0x643e68
mov ecx, edi
call fcn.00535430
mov esi, eax
test esi, esi
je 0x51de31
push str.FALSE
lea ecx, [ebp - 0x40]
call fcn.005455a0
mov dword [ebp - 4], 0x1d
mov ebx, 1
push eax
mov ecx, esi
mov dword [ebp - 0x14], ebx
call fcn.00547150
test al, al
jne 0x51ddea
push 0x623b74
lea ecx, [ebp - 0x38]
call fcn.005455a0
mov dword [ebp - 4], 0x1e
mov ebx, 3
push eax
mov ecx, esi
mov dword [ebp - 0x14], ebx
call fcn.00547150
test al, al
jne 0x51ddea
push 0x623b78
lea ecx, [ebp - 0x20]
call fcn.005455a0
push eax
mov ecx, esi
mov ebx, 7
call fcn.00547150
mov byte [ebp - 0xd], 0
test al, al
je 0x51ddee
mov byte [ebp - 0xd], 1
test bl, 4
je 0x51ddfe
lea ecx, [ebp - 0x20]
and ebx, 0xfffffffb
call fcn.00500b70
test bl, 2
je 0x51de0b
lea ecx, [ebp - 0x38]
call fcn.00500b70
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0xffffffff
call fcn.00500b70
movzx eax, byte [0x63bfa0]
xor ecx, ecx
cmp byte [ebp - 0xd], cl
mov ebx, dword [ebp - 0x18]
cmovne eax, ecx
mov byte [0x63bfa0], al
push 0x643e20
mov ecx, edi
call fcn.00535430
test eax, eax
je 0x51de4c
push eax
mov ecx, 0x643eb8
call fcn.00546210
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 0x51de72
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [ebx], 0
push 8
push ebx
mov dword [ebx + 4], 0
call fcn.0056f898
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