Function at 0x1002dd70
Capabilities:
Access peb ldr_data
Enumerate files on windows
Get common file path
Query environment variable
Resolve function by parsing pe exports
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10047a4d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x488
push ebx
mov ebx, ecx
xor eax, eax
push esi
lea ecx, [ebx + 4]
lea edx, [ebx + 0xc]
push edi
mov esi, 0x7fffffff
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x30], ebx
mov dword [ecx], eax
mov dword [ebx + 8], edx
mov dword [edx], ecx
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], eax
mov dword [ebx], vtable.R_DLList_class_P_Driver__.0
lea ecx, [ebx + 0x2c]
lea edx, [ebx + 0x34]
mov edi, vtable.R_DLList_struct_HINSTANCE____.0
mov dword [ebp - 4], eax
mov dword [ecx], eax
mov dword [ebx + 0x30], edx
mov dword [edx], ecx
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], eax
mov dword [ebx + 0x40], esi
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x48], eax
mov dword [ebx + 0x4c], eax
mov dword [ebx + 0x28], edi
lea ecx, [ebx + 0x54]
lea edx, [ebx + 0x5c]
mov dword [ecx], eax
mov dword [ebx + 0x58], edx
mov dword [edx], ecx
mov dword [ebx + 0x60], eax
mov dword [ebx + 0x64], eax
mov dword [ebx + 0x68], esi
mov dword [ebx + 0x6c], eax
mov dword [ebx + 0x70], eax
mov dword [ebx + 0x74], eax
mov dword [ebx + 0x50], vtable.R_DLList_class_P_CPUDriver__.0
lea ecx, [ebx + 0x7c]
lea edx, [ebx + 0x84]
mov dword [ecx], eax
mov dword [ebx + 0x80], edx
mov dword [edx], ecx
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x8c], eax
mov dword [ebx + 0x90], esi
mov dword [ebx + 0x94], eax
mov dword [ebx + 0x98], eax
mov dword [ebx + 0x9c], eax
mov dword [ebx + 0x78], edi
push eax
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call dword [sym.imp.rlmfc.dll_public:_void___thiscall_M_FPUControl::constructor_enum_M_FPUControl::Rounding__enum_M_FPUControl::Precision_]
inc dword [0x100666a8]
mov dword [sym.e2mfc.dll_class_P_Device__P_Driver::m_device], ebx
mov dword [sym.e2mfc.dll_class_P_Device__P_CPUDriver::m_device], ebx
or ecx, 0xffffffff
mov byte [ebp - 4], 5
mov byte [ebx + 0xa0], 1
mov byte [ebx + 0xa1], 0
mov byte [ebx + 0xa2], 0
lea edx, [ebp - 0x294]
mov edi, str.e2driver
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x54]
push ecx
lea edx, [ebp - 0x294]
push edx
call dword [sym.imp.MSVCRT.dll__stat]
add esp, 8
cmp eax, 0xffffffff
je 0x1002ded2
mov eax, dword [ebp - 0x4e]
test ah, 0x40
jne 0x1002dee9
push 0x100
lea eax, [ebp - 0x294]
push eax
push str.E2DRIVERPATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea ecx, [ebp - 0x494]
push ecx
push 0xff
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea edx, [ebp - 0x294]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x1002df1a
push str.P_Device_constructor___SetCurrentDirectory_failed._dlls_wont_be_found_n
push ebx
call sym.e2mfc.dll_public:_void___cdecl_P_Device::verbose_char_const__
add esp, 8
or ecx, 0xffffffff
xor eax, eax
mov edi, str._cpu_mfc.dll
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
lea edx, [ebp - 0x394]
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x194]
push ecx
lea edx, [ebp - 0x394]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x18], esi
je 0x1002dfd6
lea eax, [ebp - 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebp - 0x14], eax
je 0x1002dfa8
mov edx, dword [ebx + 0x78]
lea esi, [ebx + 0x78]
mov ecx, esi
call dword [edx + 4]
mov edi, eax
mov eax, dword [esi + 0xc]
lea edx, [esi + 0xc]
lea ecx, [edi - 8]
mov dword [eax + 4], ecx
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov dword [edx], ecx
inc dword [esi + 0x14]
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x18], 0x7fffffff
mov esi, dword [ebp - 0x18]
mov dword [edi], eax
jmp 0x1002dfbd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.P_Device_constructor___CPU_optimization_dll_loading_failed__LoadLibrary_error_code:__d__n
push ebx
call sym.e2mfc.dll_public:_void___cdecl_P_Device::verbose_char_const__
add esp, 0xc
lea ecx, [ebp - 0x194]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x1002df60
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x10
call sub.MFC42.DLL_operatornew
mov ecx, eax
add esp, 4
mov dword [ebp - 0x14], ecx
test ecx, ecx
mov byte [ebp - 4], 6
je 0x1002dff6
call sym.e2mfc.dll_public:_void___thiscall_P_ReferenceCPUDriver::constructor_void_
mov ecx, eax
jmp 0x1002dff8
xor ecx, ecx
mov eax, dword [sym.imp.rlmfc.dll_int_R_Memory::sm_iNewCount]
mov edx, dword [eax]
inc edx
test ecx, ecx
mov byte [ebp - 4], 5
mov dword [eax], edx
jne 0x1002e07e
lea ecx, [ebp - 0x2c]
call dword [sym.imp.rlmfc.dll_protected:_void___thiscall_R_Exception::constructor_void_]
lea edx, [ebp - 0x2c]
push str.Out_of_system_memory_resources
push edx
mov byte [ebp - 4], 7
mov dword [ebp - 0x2c], vtable.R_MemoryException_Allocation.0
call dword [sym.imp.rlmfc.dll_public:_void___cdecl_R_Exception::setError_char_const__]
add esp, 8
mov al, byte [0x10066e50]
test al, 1
mov byte [ebp - 4], 8
jne 0x1002e05b
or al, 1
mov ecx, 0x10066e60
mov byte [0x10066e50], al
call fcn.100028c0
push 0x10002880
call fcn.100455b8
add esp, 4
lea eax, [ebp - 0x2c]
push eax
mov ecx, 0x10066e60
call fcn.100339d0
push 0x1004c038
lea ecx, [ebp - 0x1c]
push ecx
mov dword [ebp - 0x1c], 0x10066e60
call sub.MSVCRT.dll__CxxThrowException
or ecx, 0xffffffff
xor eax, eax
mov edi, str._driver_mfc.dll
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
lea edx, [ebp - 0x394]
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x194]
push ecx
lea edx, [ebp - 0x394]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x18], esi
je 0x1002e13a
lea eax, [ebp - 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebp - 0x14], eax
je 0x1002e10c
mov edx, dword [ebx + 0x28]
lea esi, [ebx + 0x28]
mov ecx, esi
call dword [edx + 4]
mov edi, eax
mov eax, dword [esi + 0xc]
lea edx, [esi + 0xc]
lea ecx, [edi - 8]
mov dword [eax + 4], ecx
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov dword [edx], ecx
inc dword [esi + 0x14]
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x18], 0x7fffffff
mov esi, dword [ebp - 0x18]
mov dword [edi], eax
jmp 0x1002e121
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.P_Device_constructor___driver_dll_loading_failed__LoadLibrary_error_code:__d__n
push ebx
call sym.e2mfc.dll_public:_void___cdecl_P_Device::verbose_char_const__
add esp, 0xc
lea ecx, [ebp - 0x194]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x1002e0c4
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea edx, [ebp - 0x494]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [sym.imp.rlmfc.dll_class_R_System__Sys]
mov ecx, dword [eax]
push str.P_Device_assert_deinitialize
push 0x1002dd60
call dword [sym.imp.rlmfc.dll_public:_int___thiscall_R_System::add_void____fastcall___void___char_const__]
call fcn.1002d650
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], 3
call dword [sym.imp.rlmfc.dll_public:_void___thiscall_M_FPUControl::destructor_void_]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, ebx
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret