Function at 0x511d60
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a2171
mov eax, dword fs:[0]
push eax
sub esp, 0xb4
mov eax, dword [0x6121d4]
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 dword [ebp - 0xa4], 0
nop dword [eax + eax]
mov al, byte [0x61ade9]
test al, al
jne 0x5121a6
mov esi, dword [0x61ce04]
push 0
call fcn.0057ba60
sub eax, 0x1e
add esp, 4
cmp esi, eax
jge 0x5121a6
call fcn.00512a40
push 0x61d460
mov esi, eax
call fcn.00545d61
add esp, 4
test eax, eax
je 0x511de9
push eax
call fcn.0054581a
add esp, 4
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x511df7
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x61d460
mov dword [ebp - 4], 0
call fcn.00545d86
add esp, 4
test eax, eax
je 0x511e18
push eax
call fcn.0054581a
add esp, 4
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov word [ebp - 0xa6], ax
mov dword [ebp - 0xc0], eax
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0xa6]
push eax
push ecx
lea ecx, [ebp - 0xc0]
call fcn.004bc690
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x28]
push 0x11
xor eax, eax
mov dword [ebp - 0x14], 7
push str.System32cmd.exe
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.004ab820
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0xc0]
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x511ede
xor eax, eax
mov dword [ebp - 0x5c], 7
mov dword [ebp - 0x60], 0
mov word [ebp - 0x70], ax
cmp word [esi], ax
jne 0x511eae
xor ecx, ecx
jmp 0x511ec2
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x511eb3
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x70]
call fcn.004ab820
mov byte [ebp - 4], 3
lea edx, [ebp - 0x70]
mov ebx, dword [ebp - 0xa4]
or ebx, 1
jmp 0x511f14
push 0xa
xor eax, eax
mov dword [ebp - 0x2c], 7
push str.C:Windows
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call fcn.004ab820
mov dword [ebp - 4], 4
lea edx, [ebp - 0x40]
mov ebx, dword [ebp - 0xa4]
or ebx, 2
lea eax, [ebp - 0x28]
mov dword [ebp - 0xa4], ebx
push eax
lea ecx, [ebp - 0x88]
call fcn.004e7080
add esp, 4
mov edi, eax
lea eax, [ebp - 0x28]
cmp eax, edi
je 0x511f67
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x511f4a
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.004abec0
xor eax, eax
mov dword [ebp - 0x14], 7
push edi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.004ab9d0
mov eax, dword [ebp - 0x74]
cmp eax, 8
jb 0x511f82
inc eax
lea ecx, [ebp - 0x88]
push eax
push dword [ebp - 0x88]
call fcn.004abec0
xor eax, eax
mov dword [ebp - 0x74], 7
mov dword [ebp - 0x78], 0
mov word [ebp - 0x88], ax
test bl, 2
je 0x511fd0
mov eax, dword [ebp - 0x2c]
and ebx, 0xfffffffd
mov dword [ebp - 0xa4], ebx
cmp eax, 8
jb 0x511fbc
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004abec0
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
mov dword [ebp - 4], 2
test bl, 1
je 0x511ffa
mov eax, dword [ebp - 0x5c]
and ebx, 0xfffffffe
mov dword [ebp - 0xa4], ebx
cmp eax, 8
jb 0x511ffa
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.004abec0
xor eax, eax
mov word [ebp - 0xa8], ax
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0xa8]
push eax
push ecx
lea ecx, [ebp - 0xb4]
call fcn.004bc690
push 0x104
mov byte [ebp - 4], 6
mov edi, dword [ebp - 0xb4]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
cmp word [edi], ax
jne 0x51205d
xor ecx, ecx
jmp 0x512071
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x512062
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x58]
call fcn.004ab820
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 7
push eax
mov edx, str._c__timeout_5__del
lea ecx, [ebp - 0xa0]
call fcn.004b5880
mov edx, eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x28]
call fcn.0051d870
mov eax, dword [ebp - 0x8c]
add esp, 4
cmp eax, 8
jb 0x5120c2
inc eax
lea ecx, [ebp - 0xa0]
push eax
push dword [ebp - 0xa0]
call fcn.004abec0
xor eax, eax
mov dword [ebp - 0x8c], 7
mov word [ebp - 0xa0], ax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x90], 0
cmp eax, 8
jb 0x5120f4
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.004abec0
xor eax, eax
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
lea ecx, [ebp - 0xb4]
mov eax, dword [ebp - 0xac]
sub eax, edi
mov dword [ebp - 0x48], 0
sar eax, 1
push eax
push edi
call fcn.004abec0
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xb4], 0
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xac], 0
cmp eax, 8
jb 0x512152
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.004abec0
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x5121a6
mov eax, dword [ebp - 0xb8]
lea ecx, [ebp - 0xc0]
sub eax, esi
sar eax, 1
push eax
push esi
call fcn.004abec0
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xbc], 0
mov dword [ebp - 0xb8], 0
call fcn.00512a40
push 0x61d460
mov esi, eax
call fcn.00545d61
add esp, 4
test eax, eax
je 0x5121c7
push eax
call fcn.0054581a
add esp, 4
mov esi, dword [esi + 0x1c]
push 0x61d460
mov dword [ebp - 4], 9
call fcn.00545d86
add esp, 4
test eax, eax
je 0x5121eb
push eax
call fcn.0054581a
add esp, 4
push 0x3e8
push esi
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x511da0
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.00540c56
mov esp, ebp
pop ebp
ret