Function at 0x405150
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5492f7
mov eax, dword fs:[0]
push eax
sub esp, 0x18c
mov eax, dword [0x5ac7dc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [ebx]
mov edi, dword [sym.imp.USER32.dll_PostMessageW]
push 1
push 1
push 0x401
push dword [esi + 0x248]
call edi
mov eax, dword [ebx]
cmp dword [eax + 0x3b8], 0
jne 0x4051d6
push 3
push 1
push 0x401
push dword [esi + 0x248]
call edi
push 0
push 0
push 0x401
push dword [esi + 0x248]
call edi
jmp 0x4055a1
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.004d3150
add esp, 0xc
lea eax, [ebp - 0x114]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4051af
cmp byte [ebp - 0x114], 0
mov byte [ebp - 0x18d], 1
mov dword [ebp - 0x118], 0xf
mov dword [ebp - 0x11c], 0
mov byte [ebp - 0x12c], 0
jne 0x405231
xor ecx, ecx
jmp 0x405249
lea ecx, [ebp - 0x114]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405240
sub ecx, edx
push ecx
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x12c]
call fcn.00407fe0
push ecx
lea edx, [ebp - 0x12c]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x174]
call fcn.0040a970
add esp, 4
lea ecx, [ebp - 0x12c]
mov byte [ebp - 4], 2
call fcn.00406ce0
cmp dword [ebp - 0x160], 0x10
lea eax, [ebp - 0x174]
cmovae eax, dword [ebp - 0x174]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov edx, dword [ebx]
neg eax
sbb al, al
sub esp, 0x18
and al, byte [ebp - 0x18d]
mov ecx, esp
add edx, 0x3a8
mov dword [ebp - 0x194], eax
mov byte [ebp - 0x18d], 1
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 8
jb 0x4052de
mov eax, dword [ecx]
jmp 0x4052e0
mov eax, ecx
push 0xffffffffffffffff
xor edi, edi
push edi
push edx
mov word [eax], di
call fcn.00407d40
lea ecx, [ebp - 0x18c]
call fcn.0040d650
push str.datadrvinst64.exe
lea edx, [ebp - 0x18c]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x15c]
call fcn.0040a890
push str.datadrvinst32.exe
lea edx, [ebp - 0x18c]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x144]
call fcn.0040a890
add esp, 0x20
mov byte [ebp - 4], 5
lea eax, [ebp - 0x15c]
cmp dword [ebp - 0x148], 0x10
cmovae eax, dword [ebp - 0x15c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov edi, dword [sym.imp.USER32.dll_PostMessageW]
test eax, eax
je 0x405378
cmp dword [ebp - 0x130], 0x10
lea eax, [ebp - 0x144]
cmovae eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x405382
xor al, al
mov byte [ebp - 0x18d], al
jmp 0x405388
mov al, byte [ebp - 0x18d]
cmp byte [ebp - 0x194], 0
je 0x405399
test al, al
je 0x405399
push 2
jmp 0x40539b
push 3
push 1
push 0x401
push dword [esi + 0x248]
call edi
push 1
push 2
push 0x401
push dword [esi + 0x248]
call edi
cmp byte [ebp - 0x194], 0
je 0x4053f3
sub esp, 0x18
mov ecx, esp
push 0xd
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push str.winsock_reset
mov byte [ecx], 0
call fcn.00407fe0
call fcn.004059f0
test al, al
je 0x4053f3
push 2
jmp 0x4053f5
push 3
push 2
push 0x401
push dword [esi + 0x248]
call edi
push 1
push 3
push 0x401
push dword [esi + 0x248]
call edi
mov al, byte [ebp - 0x18d]
test al, al
je 0x40542e
mov ecx, dword [ebx]
call fcn.00405df0
test al, al
je 0x40542e
push 2
jmp 0x405430
push 3
push 3
push 0x401
push dword [esi + 0x248]
call edi
push 1
push 4
push 0x401
push dword [esi + 0x248]
call edi
call fcn.00406090
test al, al
jne 0x40545d
push 3
jmp 0x40545f
push 2
push 4
push 0x401
push dword [esi + 0x248]
call edi
push 1
push 5
push 0x401
push dword [esi + 0x248]
call edi
push ecx
call fcn.00404650
add esp, 4
test eax, eax
jne 0x405490
push 3
jmp 0x405492
push 2
push 5
push 0x401
push dword [esi + 0x248]
call edi
push 1
push 6
push 0x401
push dword [esi + 0x248]
call edi
mov ecx, dword [ebx]
call fcn.00406360
test al, al
jne 0x4054c1
push 3
jmp 0x4054c3
push 2
push 6
push 0x401
push dword [esi + 0x248]
call edi
push 1
push 7
push 0x401
push dword [esi + 0x248]
call edi
push str.dnsapi.dll
mov dword [ebp - 0x194], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x198], eax
test eax, eax
je 0x405533
push str.DnsFlushResolverCache
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40551a
call eax
mov dword [ebp - 0x194], eax
push dword [ebp - 0x198]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x194], 0
je 0x405533
push 2
jmp 0x405535
push 3
push 7
push 0x401
push dword [esi + 0x248]
call edi
push 0
push 0
push 0x401
push dword [esi + 0x248]
call edi
mov eax, dword [ebx]
push dword [eax + 0x248]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
jne 0x405575
push eax
push eax
mov eax, dword [ebx]
push 0x10
push dword [eax + 0x248]
call edi
lea ecx, [ebp - 0x144]
call fcn.00406ce0
lea ecx, [ebp - 0x15c]
call fcn.00406ce0
lea ecx, [ebp - 0x18c]
call fcn.00406ce0
lea ecx, [ebp - 0x174]
call fcn.00406ce0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ae22e
mov esp, ebp
pop ebp
ret