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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5948cb
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x4b0
mov eax, dword [0x5de00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
lea eax, [ebp - 0x220]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
xorps xmm0, xmm0
mov dword [ebp - 0x240], 0
lea ecx, [ebp - 0x220]
mov dword [ebp - 0x23c], 0
movups xmmword [ebp - 0x250], xmm0
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41cbd0
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x250]
call fcn.00403d10
mov dword [ebp - 4], 0
mov eax, SysReAllocString
mov ecx, dword [ebp - 0x240]
sub eax, ecx
cmp eax, 2
jb 0x41cfe0
cmp dword [ebp - 0x23c], 8
lea eax, [ebp - 0x250]
push 2
cmovae eax, dword [ebp - 0x250]
push 0x5bdaac
push ecx
push eax
push ecx
push dword [ebp - 0x4bc]
lea ecx, [ebp - 0x268]
call fcn.00403e90
mov ecx, dword [ebp - 0x23c]
cmp ecx, 8
jb 0x41cc7e
mov edx, dword [ebp - 0x250]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x41cc74
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41cfb0
push ecx
push edx
call fcn.0052d747
add esp, 8
movups xmm0, xmmword [ebp - 0x268]
xor eax, eax
lea ecx, [ebp - 0x268]
mov word [ebp - 0x268], ax
movups xmmword [ebp - 0x250], xmm0
movq xmm0, qword [ebp - 0x258]
movq qword [ebp - 0x240], xmm0
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 7
call fcn.00403990
cmp dword [ebp - 0x23c], 8
lea ecx, [ebp - 0x4b8]
lea eax, [ebp - 0x250]
cmovae eax, dword [ebp - 0x250]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov dword [ebp - 0x4bc], esi
cmp esi, 0xffffffff
jne 0x41cd00
xor esi, esi
jmp 0x41cf7e
test byte [ebp - 0x4b8], 0x10
je 0x41cf5c
mov ecx, 0x5bdadc
lea eax, [ebp - 0x48c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41cd3e
test dx, dx
je 0x41cd3a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41cd3e
add eax, 4
add ecx, 4
test dx, dx
jne 0x41cd18
xor eax, eax
jmp 0x41cd43
sbb eax, eax
or eax, 1
test eax, eax
je 0x41cf5c
mov ecx, 0x5bdad4
lea eax, [ebp - 0x48c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41cd7c
test dx, dx
je 0x41cd78
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41cd7c
add eax, 4
add ecx, 4
test dx, dx
jne 0x41cd56
xor eax, eax
jmp 0x41cd81
sbb eax, eax
or eax, 1
test eax, eax
je 0x41cf5c
xorps xmm0, xmm0
mov dword [ebp - 0x228], 0
lea ecx, [ebp - 0x48c]
mov dword [ebp - 0x224], 0
movups xmmword [ebp - 0x238], xmm0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41cdb0
sub ecx, edx
lea eax, [ebp - 0x48c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x238]
call fcn.00403d10
mov byte [ebp - 4], 1
mov eax, SysReAllocString
mov ecx, dword [ebp - 0x228]
sub eax, ecx
cmp eax, 0xe
jb 0x41cfe0
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
push 0xe
cmovae eax, dword [ebp - 0x238]
push str.AdvHDLang.dll
push ecx
push eax
push ecx
push dword [ebp - 0x4bc]
lea ecx, [ebp - 0x268]
call fcn.00403e90
mov ecx, dword [ebp - 0x224]
cmp ecx, 8
jb 0x41ce5b
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x41ce51
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41cfb0
push ecx
push edx
call fcn.0052d747
add esp, 8
movups xmm0, xmmword [ebp - 0x268]
xor eax, eax
lea ecx, [ebp - 0x268]
mov word [ebp - 0x268], ax
movups xmmword [ebp - 0x238], xmm0
movq xmm0, qword [ebp - 0x258]
movq qword [ebp - 0x228], xmm0
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 7
call fcn.00403990
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41cf1c
mov ecx, dword [edi + 4]
cmp ecx, dword [edi + 8]
je 0x41cf0d
xorps xmm0, xmm0
lea edx, [ebp - 0x48c]
movups xmmword [ecx], xmm0
mov dword [ecx + 0x10], 0
lea esi, [edx + 2]
mov dword [ecx + 0x14], 0
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x41cee5
sub edx, esi
lea eax, [ebp - 0x48c]
sar edx, 1
push edx
push eax
call fcn.00403d10
add dword [edi + 4], 0x18
mov esi, dword [ebp - 0x4bc]
jmp 0x41cf1c
lea eax, [ebp - 0x48c]
push eax
push ecx
mov ecx, edi
call fcn.00420740
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x224]
cmp ecx, 8
jb 0x41cf5c
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x41cf52
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41cfb0
push ecx
push edx
call fcn.0052d747
add esp, 8
lea eax, [ebp - 0x4b8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x41cd00
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, 1
mov ecx, dword [ebp - 0x23c]
cmp ecx, 8
jb 0x41cfc0
mov edx, dword [ebp - 0x250]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x41cfb6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x41cfb6
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0052d747
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0052d3c5
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00402990
int3