Function at 0x416780
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 0x416af0
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 0x4167e3
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 [0x45150c]
test eax, eax
je 0x416831
cmp byte [eax], 0
je 0x416831
push eax
call fcn.00416310
mov eax, dword [0x45150c]
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
je 0x416831
inc eax
push eax
mov dword [esp + 0x14], eax
call fcn.00416310
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, 0x44f834
lea edx, [eax + eax*8]
lea eax, [eax + edx*8]
mov edx, 1
lea ebx, [eax + eax*4]
cmp si, 0xc
jae 0x41686b
mov eax, esi
and eax, 0xffff
jmp 0x416870
mov eax, 0xc
cmp edx, eax
jge 0x41687e
mov eax, dword [ecx]
add ebx, eax
inc edx
add ecx, 4
jmp 0x41685c
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 0x4168be
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 0x4168f2
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 0x416ad0
test byte [ebx], 0x10
je 0x416aa9
lea ebp, [ebx + 0x2c]
mov edi, 0x44f870
mov esi, ebp
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x416aa9
mov edi, 0x44f86c
mov esi, ebp
mov ecx, 3
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x416aa9
mov eax, dword [esp + 0x10]
test eax, eax
je 0x41695d
push eax
push ebp
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x416aa9
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 0x416aa9
lea ecx, [esp + 0x4c]
lea edx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x416aa9
mov eax, dword [esp + 0x4c]
mov edi, dword [esp + 0x4e]
and eax, 0xffff
mov esi, 1
mov edx, 0x44f834
lea ecx, [eax + eax*8]
lea eax, [eax + ecx*8]
lea ecx, [eax + eax*4]
cmp di, 0xc
jae 0x4169ca
mov eax, edi
and eax, 0xffff
jmp 0x4169cf
mov eax, 0xc
cmp esi, eax
jge 0x4169dd
mov eax, dword [edx]
add ecx, eax
inc esi
add edx, 4
jmp 0x4169bb
mov edx, dword [esp + 0x52]
mov eax, dword [esp + 0x24]
and edx, 0xffff
add eax, 0xfffffffd
add edx, ecx
cmp edx, eax
jge 0x416aa9
push ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x416aa9
mov eax, dword [str.Mid.mid]
mov esi, 0x44f818
test eax, eax
je 0x416a28
push eax
call fcn.00416b50
mov eax, dword [esi + 4]
add esi, 4
add esp, 4
test eax, eax
jne 0x416a15
mov ecx, dword [esp + 0x14]
mov ebp, 1
push ecx
push 0x44f868
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x416a93
mov eax, dword [esp + 0x14]
test byte [eax], 0x10
je 0x416a86
add eax, 0x2c
mov edi, 0x44f870
mov esi, eax
mov ecx, 2
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x416a74
mov esi, eax
mov edi, 0x44f86c
mov ecx, 3
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x416a86
mov ecx, dword [esp + 0x14]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x416a44
jmp 0x416a88
xor ebp, ebp
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
test ebp, ebp
je 0x416a9a
call fcn.00416b00
jmp 0x416aa5
push 0x44f86c
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 0x41690a
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