Function at 0x4d04a0
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x628]
sub esp, 0x628
push 0xffffffffffffffff
push 0x549bd0
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x592174]
xor eax, ebp
mov dword [ebp + 0x624], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 0x630]
xor eax, eax
mov ebx, dword [ebp + 0x634]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 7
mov word [ebp - 0x24], ax
mov dword [ebp - 4], eax
mov dword [ebp], eax
mov eax, dword [0x5958a8]
mov dword [ebp], 0x5958a8
test eax, eax
je 0x4d0526
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 1
mov ecx, dword [0x592c54]
test ecx, ecx
je 0x4d054c
cmp dword [0x592c58], 8
mov eax, 0x592c44
cmovae eax, dword [0x592c44]
jmp 0x4d0605
push 0x20c
lea eax, [ebp + 0x418]
push 0
push eax
call fcn.0050d5d0
add esp, 0xc
lea eax, [ebp + 0x418]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
dec eax
cmp eax, 0x103
ja 0x4d06b4
xor eax, eax
push 0x412
push eax
mov word [ebp + 0x622], ax
lea eax, [ebp + 4]
push eax
call fcn.0050d5d0
add esp, 0xc
lea eax, [ebp + 4]
push 0x208
push eax
lea eax, [ebp + 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
cmp eax, 0x208
ja 0x4d05e6
test eax, eax
je 0x4d05e6
add eax, eax
cmp eax, 0x412
jae 0x4d0749
xor ecx, ecx
mov word [ebp + eax + 4], cx
lea ecx, [ebp + 4]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4d05d6
lea eax, [ebp + 4]
jmp 0x4d0601
lea ecx, [ebp + 0x418]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4d05f0
lea eax, [ebp + 0x418]
sub ecx, edx
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x24]
call fcn.00418830
mov byte [ebp - 4], 0
mov eax, dword [0x5958a8]
test eax, eax
je 0x4d0623
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
push edi
lea eax, [ebp - 0x24]
mov dword [ebp], 0
push eax
mov ecx, esi
call fcn.004d0440
test al, al
je 0x4d0642
mov bl, 1
jmp 0x4d06d1
push 0x20c
lea eax, [ebp + 0x418]
push 0
push eax
call fcn.0050d5d0
add esp, 0xc
lea eax, [ebp + 0x418]
push 0x105
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
dec eax
cmp eax, 0x103
ja 0x4d06cf
xor eax, eax
lea edx, [ebp + 0x418]
mov word [ebp + 0x622], ax
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4d0684
sub edx, ecx
lea eax, [ebp + 0x418]
sar edx, 1
lea ecx, [ebp - 0x24]
push edx
push eax
call fcn.00418830
push ebx
push edi
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
call fcn.004d0440
mov bl, al
jmp 0x4d06d1
mov byte [ebp - 4], 0
mov eax, dword [0x5958a8]
test eax, eax
je 0x4d06c8
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp], 0
xor bl, bl
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
cmp edx, 8
jb 0x4d070e
mov ecx, dword [ebp - 0x24]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4d0704
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4d074e
push edx
push ecx
call fcn.0050b392
add esp, 8
xor eax, eax
mov dword [ebp - 0x14], 0
mov word [ebp - 0x24], ax
mov al, bl
mov dword [ebp - 0x10], 7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x624]
xor ecx, ebp
call fcn.0050b0b7
lea esp, [ebp + 0x628]
pop ebp
ret 8
call fcn.0050b84e
call fcn.0050f799
int3