Function at 0x1003217
Capabilities:
Enumerate files on windows
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x564
mov eax, dword [0x1006074]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
push edi
inc ebx
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x564], eax
mov dword [ebp - 0x558], ebx
je 0x100326e
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100324d
sub eax, edx
je 0x100326e
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x1003279
mov dword [ebp - 0x558], edi
jmp 0x1003444
cmp esi, edi
jne 0x1003295
lea edi, [ebp - 0x108]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1003284
mov esi, 0x1001458
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
jmp 0x10032bf
mov eax, esi
mov edx, esi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003299
lea edi, [ebp - 0x108]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10032a9
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov cl, byte [ebp + eax - 0x108]
mov byte [ebp + eax - 0x414], cl
inc eax
test cl, cl
jne 0x10032c1
lea edi, [ebp - 0x414]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10032db
mov esi, 0x1001450
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x554]
movsw word es:[edi], word [esi]
push eax
lea eax, [ebp - 0x414]
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x55c], eax
jne 0x1003316
mov dword [ebp - 0x558], ebx
jmp 0x1003444
mov ebx, dword [sym.imp.msvcrt.dll_fgets]
test byte [ebp - 0x554], 0x10
jne 0x100341d
and dword [ebp - 0x560], 0
lea eax, [ebp - 0x528]
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x310]
push 0x1001448
push eax
call dword [sym.imp.msvcrt.dll_sprintf]
lea eax, [ebp - 0x310]
push 0x1001444
push eax
call dword [sym.imp.msvcrt.dll_fopen]
mov esi, eax
add esp, 0x18
test esi, esi
je 0x100341d
mov edi, 0x104
jmp 0x10033b6
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.msvcrt.dll__strupr]
lea eax, [ebp - 0x20c]
mov dword [esp], 0x1001438
push eax
call dword [sym.imp.msvcrt.dll_strstr]
test eax, eax
pop ecx
pop ecx
je 0x10033b6
push dword [ebp - 0x564]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.msvcrt.dll_strstr]
test eax, eax
pop ecx
pop ecx
jne 0x10033ca
push esi
lea eax, [ebp - 0x20c]
push edi
push eax
call ebx
add esp, 0xc
test eax, eax
jne 0x1003376
jmp 0x10033d4
mov dword [ebp - 0x560], 1
push esi
call dword [sym.imp.msvcrt.dll_fclose]
cmp dword [ebp - 0x560], 0
pop ecx
je 0x100341d
lea eax, [ebp - 0x310]
push eax
call fcn.01003043
lea eax, [ebp - 0x310]
push 0x2e
push eax
call dword [sym.imp.msvcrt.dll_strrchr]
mov edi, eax
pop ecx
mov esi, 0x1001430
movsd dword es:[edi], dword [esi]
pop ecx
lea eax, [ebp - 0x310]
push eax
movsb byte es:[edi], byte [esi]
call fcn.01003043
mov dword [ebp - 0x558], eax
lea eax, [ebp - 0x554]
push eax
push dword [ebp - 0x55c]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x100331c
push dword [ebp - 0x55c]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x558]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01003ba3
leave
ret 8