Function at 0x4b165b9e
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x428
mov eax, dword [0x4b16c628]
mov edx, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0xc]
or dword [edx], 0xffffffff
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
test eax, eax
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x420], eax
mov dword [ebp - 0x424], ecx
mov dword [ebp - 0x428], edi
mov dword [ebp - 0x41c], edx
je 0x4b165e7a
test ecx, ecx
je 0x4b165e7a
test edi, edi
je 0x4b165e7a
mov ecx, dword [ebp + 0x14]
xor eax, eax
rep stosw word es:[edi], ax
mov edx, 0x82
mov ecx, edx
lea edi, [ebp - 0x20c]
rep stosd dword es:[edi], eax
mov ecx, edx
lea edi, [ebp - 0x414]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20c]
push eax
mov edi, 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x4b165e5e
cmp eax, edi
jae 0x4b165e5e
and dword [ebp - 0x418], 0
lea eax, [ebp - 0x418]
push eax
push 0x7fffffff
lea eax, [ebp - 0x20c]
push eax
call fcn.4b165b5e
mov esi, eax
test esi, esi
jge 0x4b165c77
mov eax, dword [0x4b16c0b8]
cmp byte [eax + 0x19], 2
jb 0x4b165e9c
push esi
push 0x4b15384c
push 0x10
jmp 0x4b165e51
mov eax, dword [ebp - 0x418]
test eax, eax
jne 0x4b165cac
mov eax, dword [0x4b16c0b8]
cmp byte [eax + 0x19], 2
mov esi, 0x80070057
jb 0x4b165ea0
push 0x4b15384c
push 0x11
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.4b157041
jmp 0x4b165ea0
mov ax, word [ebp + eax*2 - 0x20e]
cmp ax, 0x5c
je 0x4b165cc9
cmp ax, 0x2f
je 0x4b165cc9
and dword [ebp - 0x418], 0
jmp 0x4b165cd3
mov dword [ebp - 0x418], 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call dword [sym.imp.msvcrt.dll_srand]
mov esi, dword [sym.imp.msvcrt.dll_rand]
pop ecx
call esi
mov ebx, eax
call esi
imul ebx, eax
cmp dword [ebp - 0x418], 0
push dword [ebp - 0x424]
lea eax, [ebp - 0x20c]
push ebx
push dword [ebp - 0x420]
push eax
lea eax, [ebp - 0x414]
je 0x4b165d1b
push 0x4b153878
jmp 0x4b165d20
push 0x4b15385c
push edi
push eax
call fcn.4b15763b
mov esi, eax
xor eax, eax
add esp, 0x1c
cmp esi, eax
jl 0x4b165d6e
push eax
push 0x80
push 1
push eax
push eax
push 0xc0000000
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov ecx, dword [ebp - 0x41c]
mov dword [ecx], eax
jne 0x4b165dbb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
jne 0x4b165d8e
sub ebx, 0x7ffffff5
jmp 0x4b165cf1
mov eax, dword [0x4b16c0b8]
cmp byte [eax + 0x19], 2
jb 0x4b165dbb
push esi
push 0x4b15384c
push 0x12
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.4b156ac1
jmp 0x4b165dbb
test eax, eax
jle 0x4b165d9c
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
mov eax, dword [0x4b16c0b8]
cmp byte [eax + 0x19], 2
jb 0x4b165dbb
push 0x4b15384c
push 0x13
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.4b157041
test esi, esi
pop ebx
jne 0x4b165ea0
cmp dword [ebp + 0x18], 0
jne 0x4b165e23
mov edi, dword [ebp - 0x41c]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4b165e20
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x4b165dee
call esi
mov esi, eax
jmp 0x4b165dfe
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
mov eax, dword [0x4b16c0b8]
cmp byte [eax + 0x19], 2
jb 0x4b165e1b
push 0x4b15384c
push 0x14
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.4b157041
or dword [edi], 0xffffffff
jmp 0x4b165e9c
or dword [edi], 0xffffffff
lea eax, [ebp - 0x414]
push eax
push dword [ebp + 0x14]
push dword [ebp - 0x428]
call fcn.4b156d5e
mov esi, eax
test esi, esi
jge 0x4b165e9e
mov eax, dword [0x4b16c0b8]
cmp byte [eax + 0x19], 2
jb 0x4b165e9c
push esi
push 0x4b15384c
push 0x15
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.4b156ac1
jmp 0x4b165e9c
mov eax, dword [0x4b16c0b8]
cmp byte [eax + 0x19], 2
mov esi, 0x8000ffff
jb 0x4b165ea0
push 0x4b15384c
push 0xf
jmp 0x4b165c9c
mov eax, dword [0x4b16c0b8]
cmp byte [eax + 0x19], 2
mov esi, 0x80070057
jb 0x4b165eb7
push 0x4b15384c
push 0xe
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.4b157041
test esi, esi
je 0x4b165eb7
mov edi, dword [ebp - 0x41c]
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x4b165eb7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [edi], 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
call fcn.4b163f8b
leave
ret 0x18