Function at 0x40be80
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x42c1d1
mov eax, dword fs:[0]
push eax
sub esp, 0x3b8
mov eax, dword [0x441dac]
xor eax, esp
mov dword [esp + 0x3b4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x441dac]
xor eax, esp
push eax
lea eax, [esp + 0x3cc]
mov dword fs:[0], eax
mov esi, dword [esp + 0x3dc]
push 0x103
xor edi, edi
lea eax, [esp + 0x1cd]
push edi
push eax
mov dword [esp + 0x2c], esi
mov byte [esp + 0x1d4], 0
call fcn.00418130
push str._nInfo__:_CoypInfFile_begin...._n
mov dword [esp + 0x24], edi
mov dword [esp + 0x2c], edi
call fcn.00404820
add esp, 0x10
push 0x104
lea ecx, [esp + 0x1cc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x40bf26
push str.Error_:_Get_windows_path_error_n
call fcn.00404820
add esp, 4
mov eax, 0x4e25
jmp 0x40c23f
mov eax, dword [0x43900c]
cmp eax, 4
je 0x40bf3f
cmp eax, 5
je 0x40bf3f
cmp eax, 6
je 0x40bf3f
cmp eax, 7
jne 0x40bf50
lea edx, [esp + 0x2c]
push edx
call fcn.00404be0
add esp, 4
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c8]
mov dword [esp + 0x84], 0xf
mov dword [esp + 0x80], edi
mov byte [esp + 0x70], 0
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40bf71
sub eax, edx
push eax
lea eax, [esp + 0x1cc]
push eax
lea ecx, [esp + 0x74]
call fcn.00403630
push 0x12
push str._system32drivers_
lea ecx, [esp + 0x74]
mov dword [esp + 0x3dc], edi
call fcn.00403ad0
call fcn.0040f911
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40bfbf
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
cmp dword [0x4433f4], edi
mov ebx, 1
mov byte [esp + 0x3d4], bl
mov dword [esp + 0x18], edi
jbe 0x40c1c5
mov ebp, 0x489118
jmp 0x40bff6
mov esi, dword [esp + 0x20]
mov eax, esi
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], 0
mov byte [esp + 0x54], 0
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c010
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x58]
call fcn.00403630
push ebx
push 0x42f3dc
lea ecx, [esp + 0x58]
mov byte [esp + 0x3dc], 2
call fcn.00403ad0
mov eax, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c042
sub eax, edx
push eax
push ebp
lea ecx, [esp + 0x58]
call fcn.00403ad0
mov eax, dword [esp + 0x54]
mov esi, 0x10
cmp dword [esp + 0x68], esi
jae 0x40c06b
lea eax, [esp + 0x54]
lea ecx, [esp + 0x88]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
jne 0x40c0b1
push ebp
push edi
push str._nError_:_Fail_to_find_the___d__inf_file___s__n
call fcn.00404820
add esp, 0xc
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [esp + 0x68], esi
mov byte [esp + 0x3d4], bl
jb 0x40c1a9
mov edx, dword [esp + 0x54]
push edx
jmp 0x40c1a1
mov edi, 0x4306c0
mov esi, ebp
mov ecx, 0xe
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40c0c8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov eax, dword [esp + 0x54]
je 0x40c0e7
mov esi, 0x10
cmp dword [esp + 0x68], esi
jae 0x40c0df
lea eax, [esp + 0x54]
push eax
call fcn.0040abe0
jmp 0x40c0fd
cmp dword [esp + 0x68], 0x10
jae 0x40c0f2
lea eax, [esp + 0x54]
push eax
call fcn.0040aef0
mov esi, 0x10
mov ecx, dword [esp + 0x74]
add esp, 4
cmp dword [esp + 0x84], esi
jae 0x40c111
lea ecx, [esp + 0x70]
cmp dword [esp + 0x68], esi
mov eax, dword [esp + 0x54]
jae 0x40c11f
lea eax, [esp + 0x54]
push 0
lea edx, [esp + 0x2c]
push edx
push 0xfa
lea edx, [esp + 0x2d8]
push edx
push 0
push ebx
push ecx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupCopyOEMInfA]
test eax, eax
jne 0x40c181
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esp + 0x68], esi
mov ecx, dword [esp + 0x54]
jae 0x40c156
lea ecx, [esp + 0x54]
push eax
push ecx
push str.Error_:_Install_inf__s__file_error._ErrorCode:__d_n
call fcn.00404820
add esp, 0xc
cmp dword [esp + 0x68], esi
mov dword [esp + 0x14], 0x4e25
mov byte [esp + 0x3d4], bl
jb 0x40c1a9
mov eax, dword [esp + 0x54]
push eax
jmp 0x40c1a1
push ebp
push str.Info__:_Install_inf__s__file_OK._n
call fcn.00404820
add esp, 8
cmp dword [esp + 0x68], esi
mov byte [esp + 0x3d4], bl
jb 0x40c1a9
mov ecx, dword [esp + 0x54]
push ecx
call fcn.0040f57f
add esp, 4
mov edi, dword [esp + 0x18]
add edi, ebx
add ebp, 0x1cc
cmp edi, dword [0x4433f4]
mov dword [esp + 0x18], edi
jb 0x40bff2
mov eax, dword [0x43900c]
cmp eax, 4
je 0x40c1de
cmp eax, 5
je 0x40c1de
cmp eax, 6
je 0x40c1de
cmp eax, 7
jne 0x40c1fc
cmp dword [esp + 0x1c], ebx
jne 0x40c1fc
sub esp, 0x24
mov ecx, 9
lea esi, [esp + 0x50]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.00401a70
add esp, 0x24
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3d4], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c224
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x84], 0x10
jb 0x40c23b
mov ecx, dword [esp + 0x70]
push ecx
call fcn.0040f57f
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x3cc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3b4]
xor ecx, esp
call fcn.0041811d
add esp, 0x3c4
ret