Function at 0x51b8c0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x61f1ed
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x653af8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x70], eax
xor eax, eax
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x24], 0x494260
mov dword [ebp - 0x20], 0x494268
mov dword [ebp - 0x1c], 0x494274
mov dword [ebp - 0x18], 0x494290
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 7
mov word [ebp - 0x3c], ax
mov dword [ebp - 4], eax
xor esi, esi
mov eax, 0x494260
nop word [eax + eax]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.0051bcc0
add esp, 8
mov ecx, dword [ebp - 0x44]
mov byte [ebp - 4], 1
test ecx, ecx
je 0x51b9ef
cmp dword [ebp - 0x40], 8
lea eax, [ebp - 0x54]
push ecx
cmovae eax, dword [ebp - 0x54]
lea ecx, [ebp - 0x3c]
push eax
call fcn.00501040
cmp esi, 2
jl 0x51b983
push 0x4942a8
lea ecx, [ebp - 0x3c]
call fcn.005172d0
mov dword [ebp - 0x60], 0
call fcn.005164f0
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x78]
push eax
call fcn.0051b6d0
mov eax, dword [ebp - 0x78]
add esp, 0xc
test eax, eax
je 0x51b9d8
cmp eax, 1
je 0x51b9d8
cmp dword [ebp - 0x60], 0
jne 0x51b9d8
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.0051b6d0
add esp, 0xc
cmp dword [ebp - 0x68], 3
jne 0x51b9d8
cmp dword [ebp - 0x60], 0
je 0x51ba44
cmp dword [ebp - 0x28], 8
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x2c], 0
cmovae eax, dword [ebp - 0x3c]
xor ecx, ecx
mov word [eax], cx
mov edx, dword [ebp - 0x40]
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x51ba35
mov ecx, dword [ebp - 0x54]
lea edx, [edx*2 + 2]
mov eax, ecx
mov byte [ebp - 4], 3
cmp edx, 0x1000
jb 0x51ba27
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51bcba
push edx
push ecx
call fcn.006024e7
add esp, 8
mov byte [ebp - 4], 0
mov eax, dword [ebp + esi*4 - 0x20]
inc esi
test eax, eax
jne 0x51b940
jmp 0x51ba61
mov eax, dword [ebp - 0x40]
mov byte [ebp - 4], 2
cmp eax, 8
jb 0x51ba5d
inc eax
lea ecx, [ebp - 0x54]
push eax
push dword [ebp - 0x54]
call fcn.004c2530
mov byte [ebp - 4], 0
cmp dword [ebp - 0x2c], 0
jne 0x51bb53
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor esi, esi
mov dword [ebp - 0x5c], eax
xor edi, edi
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
test eax, eax
je 0x51bac8
cmp eax, 0x7fffffff
ja 0x51bcb5
push eax
lea ecx, [ebp - 0x6c]
call fcn.004c8090
mov esi, eax
mov eax, dword [ebp - 0x5c]
add eax, eax
mov dword [ebp - 0x6c], esi
push eax
push 0
push esi
lea edi, [esi + eax]
mov dword [ebp - 0x64], edi
call fcn.006046d0
add esp, 0xc
mov dword [ebp - 0x68], edi
mov byte [ebp - 4], 5
cmp esi, edi
je 0x51bba8
sub edi, esi
mov eax, edi
sar eax, 1
push eax
push esi
mov dword [ebp - 0x5c], eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x51bbaa
mov edx, dword [ebp - 0x6c]
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x51baf5
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x3c]
call fcn.00501040
push 0x4942a8
lea ecx, [ebp - 0x3c]
call fcn.005172d0
test esi, esi
je 0x51bb50
mov ecx, dword [ebp - 0x5c]
add ecx, ecx
mov byte [ebp - 4], 8
cmp ecx, 0x1000
jb 0x51bb46
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x51bcba
mov esi, edx
push ecx
push esi
call fcn.006024e7
add esp, 8
mov edi, dword [ebp - 0x58]
xor eax, eax
mov dword [edi + 0x10], 0
mov word [edi], ax
lea eax, [ebp - 0x3c]
mov dword [edi + 0x14], 7
cmp edi, eax
je 0x51bc6f
movups xmm0, xmmword [ebp - 0x3c]
mov dword [edi + 0x10], 0
xor eax, eax
mov dword [edi + 0x14], 7
xor ecx, ecx
movups xmmword [edi], xmm0
mov word [ebp - 0x3c], cx
movq xmm0, qword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov eax, 7
movq qword [edi + 0x10], xmm0
mov dword [ebp - 0x28], eax
jmp 0x51bc72
sub edi, esi
push 0x4942b4
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0051ade0
mov eax, dword [ebp - 0x58]
xor ecx, ecx
add esp, 0xc
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
test esi, esi
je 0x51bc0b
sar edi, 1
add edi, edi
mov byte [ebp - 4], 6
cmp edi, 0x1000
jb 0x51bc01
mov ecx, dword [esi - 4]
add edi, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x51bcba
mov esi, ecx
push edi
push esi
call fcn.006024e7
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x51bc4f
mov ecx, dword [ebp - 0x3c]
lea edx, [edx*2 + 2]
mov eax, ecx
mov dword [ebp - 4], 7
cmp edx, 0x1000
jb 0x51bc45
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51bcba
push edx
push ecx
call fcn.006024e7
add esp, 8
mov edi, dword [ebp - 0x58]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00602a00
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
cmp eax, 8
jb 0x51bc52
mov ecx, dword [ebp - 0x3c]
lea edx, [eax*2 + 2]
mov eax, ecx
mov dword [ebp - 4], 0xa
cmp edx, 0x1000
jb 0x51bca9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51bcba
push edx
push ecx
call fcn.006024e7
add esp, 8
jmp 0x51bc52
call fcn.004c1d60
call fcn.0053accc
int3