Function at 0x4179d0
Capabilities:
Enumerate files on windows
Get common file path
Set current directory

Disassembly:
sub esp, 0x4c
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.MSVCRT.dll_calloc]
push 1
push 0x104
mov dword [esp + 0x18], 0
call edi
mov esi, eax
add esp, 8
test esi, esi
mov dword [esp + 0x18], esi
je 0x417d40
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 1
push 0x104
call edi
mov ebp, eax
add esp, 8
test ebp, ebp
mov dword [esp + 0x28], ebp
jne 0x417a33
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
push ebp
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [0x45399c]
test eax, eax
je 0x417a81
cmp byte [eax], 0
je 0x417a81
push eax
call fcn.00417560
mov eax, dword [0x45399c]
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
je 0x417a81
inc eax
push eax
mov dword [esp + 0x14], eax
call fcn.00417560
add esp, 4
lea ecx, [esp + 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x3e]
and eax, 0xffff
mov ecx, 0x4518e8
lea edx, [eax + eax*8]
lea eax, [eax + edx*8]
mov edx, 1
lea ebx, [eax + eax*4]
cmp si, 0xc
jae 0x417abb
mov eax, esi
and eax, 0xffff
jmp 0x417ac0
mov eax, 0xc
cmp edx, eax
jge 0x417ace
mov eax, dword [ecx]
add ebx, eax
inc edx
add ecx, 4
jmp 0x417aac
mov eax, dword [esp + 0x42]
push 1
and eax, 0xffff
push 0x140
add ebx, eax
mov dword [esp + 0x2c], ebx
call edi
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [esp + 0x1c], ebx
jne 0x417b0e
mov esi, dword [sym.imp.MSVCRT.dll_free]
push ebp
call esi
mov ecx, dword [esp + 0x1c]
push ecx
call esi
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
push 1
push 0x140
call edi
add esp, 8
mov esi, eax
test esi, esi
mov dword [esp + 0x14], esi
push ebx
jne 0x417b42
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
push ebp
call esi
mov edx, dword [esp + 0x20]
push edx
call esi
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
push str.Mrt.tmp
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x20], eax
je 0x417d20
test byte [ebx], 0x10
je 0x417cf9
lea ebp, [ebx + 0x2c]
mov edi, 0x451924
mov esi, ebp
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x417cf9
mov edi, 0x451920
mov esi, ebp
mov ecx, 3
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x417cf9
mov eax, dword [esp + 0x10]
test eax, eax
je 0x417bad
push eax
push ebp
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x417cf9
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 8]
mov dword [esp + 0x2c], eax
lea edx, [esp + 0x34]
lea eax, [esp + 0x2c]
push edx
push eax
mov dword [esp + 0x38], ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x417cf9
lea ecx, [esp + 0x4c]
lea edx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x417cf9
mov eax, dword [esp + 0x4c]
mov edi, dword [esp + 0x4e]
and eax, 0xffff
mov esi, 1
mov edx, 0x4518e8
lea ecx, [eax + eax*8]
lea eax, [eax + ecx*8]
lea ecx, [eax + eax*4]
cmp di, 0xc
jae 0x417c1a
mov eax, edi
and eax, 0xffff
jmp 0x417c1f
mov eax, 0xc
cmp esi, eax
jge 0x417c2d
mov eax, dword [edx]
add ecx, eax
inc esi
add edx, 4
jmp 0x417c0b
mov edx, dword [esp + 0x52]
mov eax, dword [esp + 0x24]
and edx, 0xffff
add eax, 0xfffffffd
add edx, ecx
cmp edx, eax
jge 0x417cf9
push ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x417cf9
mov eax, dword [str.Mid.mid]
mov esi, 0x4518cc
test eax, eax
je 0x417c78
push eax
call fcn.00417da0
mov eax, dword [esi + 4]
add esi, 4
add esp, 4
test eax, eax
jne 0x417c65
mov ecx, dword [esp + 0x14]
mov ebp, 1
push ecx
push 0x45191c
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x417ce3
mov eax, dword [esp + 0x14]
test byte [eax], 0x10
je 0x417cd6
add eax, 0x2c
mov edi, 0x451924
mov esi, eax
mov ecx, 2
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x417cc4
mov esi, eax
mov edi, 0x451920
mov ecx, 3
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x417cd6
mov ecx, dword [esp + 0x14]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x417c94
jmp 0x417cd8
xor ebp, ebp
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
test ebp, ebp
je 0x417cea
call fcn.00417d50
jmp 0x417cf5
push 0x451920
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x417b5a
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x28]
push ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push esi
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
push ebx
call esi
push ebp
call esi
mov ecx, dword [esp + 0x24]
push ecx
call esi
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret