Function at 0x477ac0
Capabilities:
Check if file exists
Enumerate files on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fee18
mov eax, dword fs:[0]
push eax
sub esp, 0xb9c
mov eax, dword [0x53000c]
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
push 0x20a
lea eax, [ebp - 0x220]
mov dword [ebp - 0xb14], 0
push 0
push eax
call fcn.004bcaf0
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x220]
add esp, 0xc
push eax
push 0
push 0
push 0x1a
push 0
call esi
cmp dword [0x53b858], 8
mov eax, 0x53b844
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmovae eax, dword [0x53b844]
push eax
lea eax, [ebp - 0x220]
push eax
call ebx
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x220]
push eax
call edi
test eax, eax
jne 0x477b9e
push 0x20a
push eax
lea eax, [ebp - 0x220]
push eax
call fcn.004bcaf0
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
push 1
push 0
push 0x1a
push 0
call esi
cmp dword [0x53b858], 8
mov eax, 0x53b844
cmovae eax, dword [0x53b844]
push eax
lea eax, [ebp - 0x220]
push eax
call ebx
lea eax, [ebp - 0x220]
push eax
call edi
test eax, eax
je 0x47834c
push 1
xor eax, eax
mov dword [ebp - 0xb20], 0
push 0x51f2ec
lea ecx, [ebp - 0xb30]
mov dword [ebp - 0xb1c], 7
mov word [ebp - 0xb30], ax
call fcn.0041a5b0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x220]
xor eax, eax
mov dword [ebp - 0xb38], 0
mov dword [ebp - 0xb34], 7
lea edx, [ecx + 2]
mov word [ebp - 0xb48], ax
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x477c10
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0xb48]
call fcn.0041a5b0
lea eax, [ebp - 0xb48]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0xba4]
call fcn.00498a60
lea ecx, [ebp - 0xb30]
mov byte [ebp - 4], 2
push ecx
lea ecx, [ebp - 0xb8c]
push ecx
mov ecx, eax
call fcn.00498ae0
cmp dword [eax + 0x14], 8
jb 0x477c69
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea ecx, [ebp - 0xb8c]
call fcn.0041a210
lea ecx, [ebp - 0xba4]
call fcn.0041a210
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0xb34]
cmp edx, 8
jb 0x477cd1
mov ecx, dword [ebp - 0xb48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x477cc7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4783ec
push edx
push ecx
call fcn.0048e9ad
add esp, 8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0xb1c]
mov dword [ebp - 0xb38], 0
mov dword [ebp - 0xb34], 7
mov word [ebp - 0xb48], ax
cmp edx, 8
jb 0x477d35
mov ecx, dword [ebp - 0xb30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x477d2b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4783f1
push edx
push ecx
call fcn.0048e9ad
add esp, 8
mov edi, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea eax, [ebp - 0x8c0]
push eax
lea eax, [ebp - 0x428]
push eax
call edi
mov dword [ebp - 0xb50], eax
cmp eax, 0xffffffff
je 0x47834c
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push 0x51c7cc
lea eax, [ebp - 0x894]
push eax
call esi
test eax, eax
je 0x478331
push 0x51c7d0
lea eax, [ebp - 0x894]
push eax
call esi
test eax, eax
je 0x478331
test byte [ebp - 0x8c0], 0x10
je 0x478331
xor eax, eax
mov dword [ebp - 0xb20], 0
lea ecx, [ebp - 0x894]
mov dword [ebp - 0xb1c], 7
mov word [ebp - 0xb30], ax
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x477dc0
sub ecx, edx
lea eax, [ebp - 0x894]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0xb30]
call fcn.0041a5b0
mov edx, dword [ebp - 0xb1c]
cmp edx, 8
jb 0x477e22
mov ecx, dword [ebp - 0xb30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x477e18
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4783ec
push edx
push ecx
call fcn.0048e9ad
add esp, 8
cmp dword [ebp - 0xb20], 0x20
jne 0x478331
lea eax, [ebp - 0x894]
push eax
lea eax, [ebp - 0x220]
push eax
call ebx
cmp dword [0x53b870], 8
mov eax, 0x53b85c
cmovae eax, dword [0x53b85c]
push eax
lea eax, [ebp - 0x220]
push eax
call ebx
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x478331
push 0x51f2ec
lea ecx, [ebp - 0xb48]
call fcn.0041a2b0
lea eax, [ebp - 0x220]
mov dword [ebp - 4], 3
push eax
lea ecx, [ebp - 0xb30]
call fcn.0041a2b0
lea eax, [ebp - 0xb30]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0xb8c]
call fcn.00498a60
lea ecx, [ebp - 0xb48]
mov byte [ebp - 4], 5
push ecx
lea ecx, [ebp - 0xba4]
push ecx
mov ecx, eax
call fcn.00498ae0
cmp dword [eax + 0x14], 8
jb 0x477ed1
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea ecx, [ebp - 0xba4]
call fcn.0041a210
lea ecx, [ebp - 0xb8c]
call fcn.0041a210
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0xb1c]
cmp edx, 8
jb 0x477f39
mov ecx, dword [ebp - 0xb30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x477f2f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4783ec
push edx
push ecx
call fcn.0048e9ad
add esp, 8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0xb34]
mov dword [ebp - 0xb20], 0
mov dword [ebp - 0xb1c], 7
mov word [ebp - 0xb30], ax
cmp edx, 8
jb 0x477f9d
mov ecx, dword [ebp - 0xb48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x477f93
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4783ec
push edx
push ecx
call fcn.0048e9ad
add esp, 8
lea eax, [ebp - 0xb10]
push eax
lea eax, [ebp - 0x630]
push eax
call edi
mov dword [ebp - 0xb4c], eax
cmp eax, 0xffffffff
je 0x478331
push 0x104
call fcn.0048f04d
add esp, 4
mov ebx, eax
mov dword [ebp - 0xb18], ebx
push 0x104
push 0
push ebx
call fcn.004bcaf0
add esp, 0xc
push 0
call fcn.004cbffd
add esp, 4
mov dword [ebp - 0x648], eax
lea eax, [ebp - 0x648]
mov dword [ebp - 0x644], edx
push eax
lea eax, [ebp - 0x66c]
push eax
call fcn.004cdc3d
push dword [ebp - 0x660]
mov eax, dword [ebp - 0x65c]
inc eax
push eax
mov eax, dword [ebp - 0x658]
add eax, 0x76c
push eax
push str._d__02d__02d
push 0x104
push ebx
call fcn.00421c30
add esp, 0x20
nop word [eax + eax]
push 0x51c7cc
lea eax, [ebp - 0xae4]
push eax
call esi
test eax, eax
je 0x478301
push 0x51c7d0
lea eax, [ebp - 0xae4]
push eax
call esi
test eax, eax
je 0x478301
test byte [ebp - 0xb10], 0x10
jne 0x478301
xorps xmm0, xmm0
mov dword [ebp - 0x634], 0
movq qword [ebp - 0x63c], xmm0
mov dword [ebp - 0x63c], 0
mov dword [ebp - 0x638], 0
mov dword [ebp - 0x634], 0
lea eax, [ebp - 0xae4]
mov dword [ebp - 4], 6
push eax
lea ecx, [ebp - 0xb70]
call fcn.0041a2b0
lea ecx, [ebp - 0x63c]
mov byte [ebp - 4], 7
push ecx
push 0x2e
push eax
call fcn.004a5270
mov byte [ebp - 4], 6
add esp, 0xc
mov edx, dword [ebp - 0xb5c]
cmp edx, 8
jb 0x47811f
mov ecx, dword [ebp - 0xb70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x478115
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4783ec
push edx
push ecx
call fcn.0048e9ad
add esp, 8
mov ecx, dword [ebp - 0x638]
mov eax, 0x2aaaaaab
mov edi, dword [ebp - 0x63c]
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4781e5
mov dword [ebp - 0xb58], ebx
test ebx, ebx
jne 0x478152
xor eax, eax
jmp 0x478160
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x478157
sub eax, edx
mov dword [ebp - 0xb54], eax
lea eax, [ebp - 0xb58]
push eax
lea eax, [ebp - 0xb70]
push eax
call fcn.004a0e60
mov ecx, dword [ebp - 0x638]
mov ebx, eax
mov edi, dword [ebp - 0x63c]
mov eax, 0x2aaaaaab
or dword [ebp - 0xb14], 1
sub ecx, edi
imul ecx
add esp, 8
mov ecx, ebx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [ebx + 0x14], 8
lea eax, [eax + eax*2]
lea edx, [edi + eax*8]
jb 0x4781b4
mov ecx, dword [ebx]
cmp dword [edx - 4], 8
lea esi, [edx - 0x18]
jb 0x4781c0
mov esi, dword [edx - 0x18]
mov edx, dword [edx - 8]
cmp edx, dword [ebx + 0x10]
jne 0x4781e5
test edx, edx
je 0x4781e1
sub esi, ecx
nop
mov ax, word [ecx + esi]
cmp ax, word [ecx]
jne 0x4781e5
add ecx, 2
sub edx, 1
jne 0x4781d0
mov bl, 1
jmp 0x4781e7
xor bl, bl
mov eax, dword [ebp - 0xb14]
test al, 1
je 0x47825d
mov edx, dword [ebp - 0xb5c]
and eax, 0xfffffffe
mov dword [ebp - 0xb14], eax
cmp edx, 8
jb 0x478240
mov ecx, dword [ebp - 0xb70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x478230
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4783ec
push edx
push ecx
call fcn.0048e9ad
mov edi, dword [ebp - 0x63c]
add esp, 8
xor eax, eax
mov dword [ebp - 0xb60], 0
mov dword [ebp - 0xb5c], 7
mov word [ebp - 0xb70], ax
test bl, bl
jne 0x47836b
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x4782f5
lea eax, [ebp - 0x63c]
push eax
push dword [ebp - 0x638]
push edi
call fcn.0041b670
mov ecx, dword [ebp - 0x634]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x63c]
add esp, 0xc
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, esi
shl ecx, 3
cmp ecx, 0x1000
jb 0x4782cd
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4783ec
push ecx
push esi
call fcn.0048e9ad
add esp, 8
mov dword [ebp - 0x63c], 0
mov dword [ebp - 0x638], 0
mov dword [ebp - 0x634], 0
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
mov ebx, dword [ebp - 0xb18]
lea eax, [ebp - 0xb10]
push eax
push dword [ebp - 0xb4c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x478040
push ebx
call fcn.0048edb4
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea eax, [ebp - 0x8c0]
push eax
push dword [ebp - 0xb50]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x477d60
or eax, 0xffffffff
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.0048e99c
mov esp, ebp
pop ebp
ret
push dword [ebp - 0xb18]
call fcn.0048edb4
mov ecx, dword [ebp - 0x63c]
add esp, 4
test ecx, ecx
je 0x4783e2
lea eax, [ebp - 0x63c]
push eax
push dword [ebp - 0x638]
push ecx
call fcn.0041b670
mov ecx, dword [ebp - 0x634]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x63c]
add esp, 0xc
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, esi
shl ecx, 3
cmp ecx, 0x1000
jb 0x4783d8
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4783f6
push ecx
push esi
call fcn.0048e9ad
add esp, 8
mov eax, 1
jmp 0x47834f
call fcn.004c5929
call fcn.004c5929
call fcn.004c5929
int3