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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x72df01
mov eax, dword fs:[0]
push eax
sub esp, 0x2f0
mov eax, dword [0x83e264]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x28]
mov eax, dword [ebp + 0xc]
xor edi, edi
push esi
mov dword [ebp - 0x2a4], eax
mov dword [ebp - 0x29c], edi
call fcn.00482720
push esi
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], edi
call fcn.00482720
cmp dword [esi + 0x14], 8
mov eax, esi
mov byte [ebp - 4], 1
jb 0x516e84
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x516ee6
test al, 0x10
je 0x516ee6
mov eax, dword [esi + 0x10]
test eax, eax
je 0x516ed0
cmp dword [esi + 0x14], 8
jb 0x516ea3
mov esi, dword [esi]
cmp word [esi + eax*2 - 2], 0x5c
je 0x516ed0
push 1
push 0x748ca4
lea ecx, [ebp - 0x28]
call fcn.00481660
mov ecx, 2
mov eax, 0x73bef8
push ecx
push eax
lea ecx, [ebp - 0x40]
call fcn.00481660
jmp 0x516f2b
mov ecx, 1
mov eax, 0x7488fc
push ecx
push eax
lea ecx, [ebp - 0x40]
call fcn.00481660
jmp 0x516f2b
cmp dword [esi + 0x14], 8
mov eax, dword [esi + 0x10]
jb 0x516ef1
mov esi, dword [esi]
test eax, eax
je 0x516f2b
dec eax
or ecx, 0xffffffff
cmp eax, ecx
cmovb ecx, eax
cmp word [esi + ecx*2], 0x5c
lea eax, [esi + ecx*2]
je 0x516f15
cmp eax, esi
je 0x516f2b
sub eax, 2
cmp word [eax], 0x5c
jne 0x516f08
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x516f2b
push dword [ebp - 0x18]
inc eax
lea ecx, [ebp - 0x28]
push eax
call fcn.004eb930
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x290]
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, dword [ebp - 0x28]
mov dword [ebp - 0x2a0], eax
cmp eax, 0xffffffff
je 0x5172e6
mov esi, eax
nop dword [eax + eax]
cmp word [ebp - 0x264], 0x2e
jne 0x516f8e
mov ax, word [ebp - 0x262]
test ax, ax
je 0x5172c6
cmp ax, 0x2e
jne 0x516f8e
cmp word [ebp - 0x260], 0
je 0x5172c6
mov ecx, dword [ebp - 0x290]
lea esi, [ebp - 0x264]
and ecx, 0x10
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x516fa0
sub esi, edx
mov eax, bind
sar esi, 1
test ecx, ecx
mov ecx, dword [ebp - 0x18]
je 0x51711c
sub eax, ecx
cmp eax, esi
jb 0x517385
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov edi, 7
mov dword [ebp - 0x2c4], 0
cmovae eax, dword [ebp - 0x28]
add ecx, esi
mov dword [ebp - 0x2a8], eax
lea eax, [ebp - 0x2c4]
mov dword [ebp - 0x2b4], 0
mov dword [ebp - 0x2b0], 0
mov dword [ebp - 0x298], ecx
mov dword [ebp - 0x294], eax
cmp ecx, edi
jbe 0x517060
mov edi, ecx
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x517029
mov edi, bind
jmp 0x517034
cmp edi, 0xa
mov eax, 0xa
cmovb edi, eax
xor ecx, ecx
mov eax, edi
add eax, 1
setb cl
neg ecx
or ecx, eax
push ecx
lea ecx, [ebp - 0x2c4]
call fcn.00481610
mov ecx, dword [ebp - 0x298]
mov dword [ebp - 0x294], eax
mov dword [ebp - 0x2c4], eax
mov dword [ebp - 0x2b0], edi
mov edi, dword [ebp - 0x18]
add edi, edi
mov dword [ebp - 0x2b4], ecx
push edi
push dword [ebp - 0x2a8]
push eax
call fcn.0051ff00
mov eax, dword [ebp - 0x294]
lea ecx, [ebp - 0x264]
add esi, esi
add eax, edi
push esi
push ecx
push eax
call fcn.0051ff00
mov eax, dword [ebp - 0x294]
xor edx, edx
mov ecx, dword [ebp - 0x298]
mov word [eax + ecx*2], dx
push dword [ebp - 0x2a4]
lea eax, [ebp - 0x2c4]
mov byte [ebp - 4], 2
push eax
call fcn.00516e20
mov edi, dword [ebp - 0x29c]
add esp, 0x20
mov edx, dword [ebp - 0x2b0]
add edi, eax
mov dword [ebp - 0x29c], edi
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x5172c0
mov ecx, dword [ebp - 0x2c4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x51710d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x517380
push edx
push ecx
call fcn.0051def4
add esp, 8
jmp 0x5172c0
inc edi
sub eax, ecx
mov dword [ebp - 0x29c], edi
cmp eax, esi
jb 0x517385
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov edi, 7
mov dword [ebp - 0x2dc], 0
cmovae eax, dword [ebp - 0x28]
add ecx, esi
mov dword [ebp - 0x2a8], eax
lea eax, [ebp - 0x2dc]
mov dword [ebp - 0x298], ecx
mov dword [ebp - 0x294], eax
cmp ecx, edi
jbe 0x5171b0
mov edi, ecx
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x517179
mov edi, bind
jmp 0x517184
cmp edi, 0xa
mov eax, 0xa
cmovb edi, eax
xor ecx, ecx
mov eax, edi
add eax, 1
setb cl
neg ecx
or ecx, eax
push ecx
lea ecx, [ebp - 0x2dc]
call fcn.00481610
mov ecx, dword [ebp - 0x298]
mov dword [ebp - 0x294], eax
mov dword [ebp - 0x2dc], eax
mov dword [ebp - 0x2c8], edi
mov edi, dword [ebp - 0x18]
add edi, edi
mov dword [ebp - 0x2cc], ecx
push edi
push dword [ebp - 0x2a8]
push eax
call fcn.0051ff00
mov eax, dword [ebp - 0x294]
lea ecx, [ebp - 0x264]
add esi, esi
add eax, edi
push esi
push ecx
push eax
call fcn.0051ff00
mov eax, dword [ebp - 0x294]
xor edx, edx
mov ecx, dword [ebp - 0x298]
add esp, 0x18
mov word [eax + ecx*2], dx
movups xmm0, xmmword [ebp - 0x2dc]
xor eax, eax
mov word [ebp - 0x2dc], ax
movups xmmword [ebp - 0x2bc], xmm0
movups xmmword [ebp - 0x2fc], xmm0
movq xmm0, qword [ebp - 0x2cc]
movq qword [ebp - 0x2ac], xmm0
movq qword [ebp - 0x2ec], xmm0
mov dword [ebp - 0x2cc], edx
mov dword [ebp - 0x2c8], 7
mov edi, dword [ebp - 0x2a4]
mov byte [ebp - 4], 4
cmp dword [edi + 4], 0x7ffffff
mov esi, dword [edi]
je 0x51738a
mov dword [ebp - 0x2e4], edi
push 0x20
mov byte [ebp - 4], 5
mov dword [ebp - 0x2e0], eax
call fcn.0051dec4
movups xmm0, xmmword [ebp - 0x2bc]
mov ecx, eax
mov dword [ebp - 0x2e0], 0
add esp, 4
mov byte [ebp - 4], 1
mov dword [ecx + 0x18], 0
mov dword [ecx + 0x1c], 0
movups xmmword [ecx + 8], xmm0
movq xmm0, qword [ebp - 0x2ac]
movq qword [ecx + 0x18], xmm0
inc dword [edi + 4]
mov eax, dword [esi + 4]
mov edi, dword [ebp - 0x29c]
mov dword [ecx], esi
mov dword [ecx + 4], eax
mov dword [esi + 4], ecx
mov dword [eax], ecx
mov esi, dword [ebp - 0x2a0]
lea eax, [ebp - 0x290]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x516f60
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x51731c
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x517312
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x517380
push edx
push ecx
call fcn.0051def4
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x2c], 7
cmp eax, 8
jb 0x517363
lea ecx, [eax*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x517359
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x517380
push ecx
push esi
call fcn.0051def4
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0051deb6
mov esp, ebp
pop ebp
ret
call fcn.0052981f
call fcn.00481190
push str.list_too_long
call fcn.0051a0ed
int3