Function at 0x415170
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x418d9b
mov eax, dword fs:[0]
push eax
sub esp, 0x2a8
mov eax, dword [0x4212a8]
xor eax, esp
mov dword [esp + 0x2a0], eax
push ebx
push esi
push edi
mov eax, dword [0x4212a8]
xor eax, esp
push eax
lea eax, [esp + 0x2b8]
mov dword fs:[0], eax
lea ebx, [esp + 0x10]
call fcn.00414bd0
test eax, eax
jne 0x4151c5
or eax, 0xffffffff
jmp 0x415404
xor edi, edi
mov dword [esp + 0x84], 7
mov dword [esp + 0x80], edi
mov word [esp + 0x70], di
lea ecx, [esp + 0x6c]
mov dword [esp + 0x2c0], edi
call fcn.00414480
push 0x206
lea eax, [esp + 0xaa]
push edi
push eax
mov word [esp + 0xb0], di
call fcn.00407e80
add esp, 0xc
push 0x104
lea ecx, [esp + 0xa8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp dword [esp + 0x10], edi
jne 0x4153e7
lea edx, [esp + 0x6c]
push edx
mov ebx, 0x41e1c8
lea esi, [esp + 0x18]
call fcn.00401e40
add esp, 4
push eax
mov ebx, str.BDMWrench.sys
lea esi, [esp + 0x8c]
mov byte [esp + 0x2c4], 1
call fcn.00401e40
add esp, 4
mov byte [esp + 0x2c0], 3
cmp dword [esp + 0x2c], 8
jb 0x415278
mov eax, dword [esp + 0x18]
push eax
call fcn.0040304f
add esp, 4
mov eax, 7
mov dword [esp + 0x2c], eax
mov dword [esp + 0x68], eax
lea eax, [esp + 0xa4]
mov dword [esp + 0x28], edi
mov word [esp + 0x18], di
mov dword [esp + 0x64], edi
mov word [esp + 0x54], di
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4152a1
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0xa8]
push ecx
lea esi, [esp + 0x58]
call fcn.00401930
mov edx, esi
push edx
mov ebx, str.drivers
lea esi, [esp + 0x38]
mov byte [esp + 0x2c4], 4
call fcn.00401e40
add esp, 4
push eax
mov ebx, str.BDMWrench.sys
lea esi, [esp + 0x18]
mov byte [esp + 0x2c4], 5
call fcn.00401e40
add esp, 4
push 0xffffffffffffffff
push edi
lea ecx, [esp + 0x58]
mov byte [esp + 0x2c8], 6
call fcn.00401540
mov esi, 8
cmp dword [esp + 0x2c], esi
jb 0x415324
mov eax, dword [esp + 0x18]
push eax
call fcn.0040304f
add esp, 4
mov ebx, 7
mov byte [esp + 0x2c0], 4
cmp dword [esp + 0x4c], esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], edi
mov word [esp + 0x18], di
jb 0x415351
mov ecx, dword [esp + 0x38]
push ecx
call fcn.0040304f
add esp, 4
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0xffffffffffffffff
mov dword [ecx + 0x18], ebx
mov dword [ecx + 0x14], edi
push edi
lea eax, [esp + 0x74]
mov word [ecx + 4], di
call fcn.00401540
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x68], esp
mov byte [esp + 0x2f8], bl
push 0xffffffffffffffff
mov dword [ecx + 0x18], ebx
mov dword [ecx + 0x14], edi
push edi
lea eax, [esp + 0xc8]
mov word [ecx + 4], di
call fcn.00401540
mov ecx, dword [ebp + 8]
mov byte [esp + 0x2f8], 4
call fcn.00414ed0
add esp, 0x38
cmp dword [esp + 0x68], esi
jb 0x4153bf
mov edx, dword [esp + 0x54]
push edx
call fcn.0040304f
add esp, 4
cmp dword [esp + 0xa0], esi
mov dword [esp + 0x68], ebx
mov dword [esp + 0x64], edi
mov word [esp + 0x54], di
jb 0x4153ec
mov eax, dword [esp + 0x8c]
push eax
call fcn.0040304f
add esp, 4
jmp 0x4153ec
mov esi, 8
cmp dword [esp + 0x84], esi
jb 0x415402
mov ecx, dword [esp + 0x70]
push ecx
call fcn.0040304f
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x2b8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2a0]
xor ecx, esp
call fcn.00402fb2
mov esp, ebp
pop ebp
ret 0x10