Function at 0x40e1f0
Capabilities:
Enumerate files on windows
Set current directory
Set environment variable

Disassembly:
sub esp, 0x8b8
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x268]
push 0x104
push eax
push 0x437430
xor edi, edi
mov dword [esp + 0x1c], 0xffffffff
call fcn.0040e560
add esp, 0xc
lea ecx, [esp + 0x268]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [0x439254]
mov ebx, dword [sym.imp.USER32.dll_LoadStringW]
lea edx, [esp + 0x268]
push 0x104
push edx
push 0x6f
push eax
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea ecx, [esp + 0x268]
push ecx
push str.PATH
call ebp
lea edx, [esp + 0x6c0]
push 0x104
push edx
push str..mll
call fcn.0040e560
add esp, 0xc
mov esi, eax
test esi, esi
je case.default.0x40e30f
lea eax, [esp + 0x18]
lea ecx, [esp + 0x6c0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je case.default.0x40e30f
lea edx, [esp + 0x44]
push edx
push esi
call fcn.004182c8
lea eax, [esp + 0x4c]
push eax
call fcn.00418527
lea ebp, [esp + eax*2 + 0x48]
push ebp
call fcn.004188d3
push 0x42ce7c
push ebp
call fcn.00418993
add esp, 0x18
test eax, eax
jne 0x40e2e5
mov edx, dword [sym.imp.uDirector.dll_class_IDirector__g_IDirector]
lea ecx, [esp + 0x6c0]
push ecx
mov ecx, dword [edx]
call dword [sym.imp.uDirector.dll_public:_int___thiscall_IDirector::LoadModule_unsigned_short_int_const__]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40e29e
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebp, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp edi, 5
ja case.default.0x40e30f
jmp dword [edi*4 + 0x40e540]
mov ecx, dword [0x439254]
lea eax, [esp + 0x44]
push 0x104
push eax
push 0x6e
push ecx
mov edi, 5
call ebx
lea edx, [esp + 0x44]
push 0x42abd8
push edx
call fcn.0041829e
lea eax, [esp + 0x6c8]
push 0x104
lea ecx, [esp + 0x50]
push eax
push ecx
call fcn.0040e560
add esp, 0x14
test eax, eax
je case.default.0x40e30f
lea edx, [esp + 0x470]
lea eax, [esp + 0x6c0]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
test eax, eax
mov dword [esp + 0x10], eax
je case.default.0x40e30f
mov edi, 4
jmp case.default.0x40e30f
test byte [esp + 0x470], 0x10
jne 0x40e3b1
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x470]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne case.default.0x40e30f
mov edi, 5
jmp case.default.0x40e30f
mov edi, 2
jmp case.default.0x40e30f
mov ecx, dword [0x439254]
lea eax, [esp + 0x268]
push 0x104
push eax
push 0x6f
push ecx
call ebx
lea edx, [esp + 0x268]
push edx
call fcn.00418527
lea esi, [esp + eax*2 + 0x26c]
push 0x42ce74
push esi
call fcn.004182c8
push esi
call fcn.00418527
add esp, 0x10
lea esi, [esi + eax*2]
mov eax, dword [0x439254]
push 0xc8
push esi
push 0x6e
push eax
call ebx
lea ecx, [esp + 0x44]
push esi
push ecx
call fcn.004182c8
push esi
call fcn.00418527
lea edx, [esp + 0x4a8]
lea eax, [esi + eax*2]
push edx
push eax
call fcn.004182c8
add esp, 0x14
lea eax, [esp + 0x268]
push eax
push str.PATH
call ebp
lea ecx, [esp + 0x6c0]
push 0x104
lea edx, [esp + 0x48]
push ecx
push edx
call fcn.0040e560
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40e4ce
jmp case.default.0x40e30f
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x470]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov edi, eax
neg edi
sbb edi, edi
add edi, 5
jmp case.default.0x40e30f
lea edx, [esp + 0x49c]
push 0x42abd0
push edx
call fcn.00418993
add esp, 8
test eax, eax
je 0x40e4c4
lea eax, [esp + 0x49c]
push 0x42abc8
push eax
call fcn.00418993
add esp, 8
test eax, eax
je 0x40e4c4
mov edi, 1
jmp case.default.0x40e30f
mov edi, 3
jmp case.default.0x40e30f
push esi
call fcn.00418527
lea ecx, [esp + 0x4a0]
lea esi, [esi + eax*2]
push ecx
push esi
call fcn.004182c8
push esi
call fcn.00418527
lea esi, [esi + eax*2]
push str..mll
mov word [esi], 0x5c
add esi, 2
push esi
call fcn.004182c8
add esp, 0x18
mov edi, 3
jmp 0x40e27a
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [0x439190]
pop edi
pop esi
pop ebp
test ecx, ecx
pop ebx
je 0x40e52c
call fcn.00410060
mov eax, dword [sym.imp.uDirector.dll_class_IDirector__g_IDirector]
mov ecx, dword [eax]
call dword [sym.imp.uDirector.dll_public:_void___thiscall_IDirector::FinishLoad_void_]
add esp, 0x8b8
ret