Function at 0x1004a112
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
and dword [ebp - 0x14], 0
xor eax, eax
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0xc], eax
push 7
xor ebx, ebx
mov dword [ebp - 0x10], esi
lea edi, [ebp - 0x38]
mov dword [ebp - 4], 0x20000000
pop ecx
rep stosd dword es:[edi], eax
cmp dword [ebp + 0x1c], eax
je 0x1004a6d9
test esi, esi
je 0x1004a6d9
cmp edx, 0x24
jb 0x1004a6c9
cmp dword [esi + 4], 0x5d6
jne 0x1004a6c9
cmp dword [esi], edx
ja 0x1004a6c9
push 0x48
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
jne 0x1004a19e
mov eax, 0x8007000e
push eax
push 0x51f
mov edi, eax
mov ecx, 0x10009950
call fcn.1003a254
jmp 0x1004a705
mov dword [ebx + 0x2c], 1
lea esi, [esi + 0x10]
mov eax, dword [esi + 0x10]
lea edi, [ebx + 0x14]
mov dword [ebx + 0x3c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebx + 0x30], eax
mov eax, dword [esi - 8]
mov dword [ebx + 0x10], eax
lea eax, [ebp - 0x38]
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x10]
mov ecx, esi
call fcn.1004a9a4
mov edi, eax
test edi, edi
jns 0x1004a1dd
push edi
push 0x52f
jmp 0x1004a18f
mov eax, dword [ebp - 0x38]
mov edi, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 8], eax
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], ecx
test eax, eax
je 0x1004a6b9
test edi, edi
je 0x1004a6b9
test ecx, ecx
je 0x1004a6b9
push 0
xor edx, edx
mov ecx, edi
call fcn.1003670e
mov dword [ebx + 8], eax
test eax, eax
jne 0x1004a229
mov eax, 0x8007000e
push eax
push 0x543
jmp 0x1004a18d
lea edx, [ebx + 0x34]
mov ecx, eax
call fcn.1004909d
mov edi, eax
test edi, edi
jns 0x1004a244
push edi
push 0x577
jmp 0x1004a18f
push dword [ebp - 8]
push 0x10009950
push 0x1000997c
push 0x10000
call fcn.10039c80
add esp, 0x10
cmp dword [ebp + 0x10], 0
jne 0x1004a27e
cmp dword [ebp + 0xc], 0
je 0x1004a277
cmp dword [esi + 0x20], 0
mov dword [ebp - 4], 0xe0000000
je 0x1004a27e
mov dword [ebp - 4], 0xa0000000
mov ecx, dword [ebp - 8]
xor edx, edx
push 0
call fcn.1003670e
mov dword [ebx + 0xc], eax
test eax, eax
jne 0x1004a2a1
mov eax, 0x8007000e
push eax
push 0x58a
jmp 0x1004a18d
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
push 0
or eax, 0x40
push eax
push 3
push dword [ebp - 4]
push dword [ebp - 8]
call sym.WIMGAPI.DLL_WIMCreateFile
mov dword [ebx + 0x28], eax
test eax, eax
jne 0x1004a301
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x1004a2e1
cmp eax, 2
je 0x1004a2e1
cmp eax, 0x35
je 0x1004a2e1
cmp eax, 0x43
je 0x1004a2e1
cmp eax, 0xb
jne 0x1004a2e3
xor eax, eax
test eax, eax
je 0x1004a301
jg 0x1004a2ed
mov edi, eax
jmp 0x1004a2f6
movzx edi, ax
or edi, 0x80070000
push edi
push 0x5a5
jmp 0x1004a18f
cmp dword [ebp + 0x10], 0
jne 0x1004a6b0
cmp dword [ebx + 0x28], 0
je 0x1004a4df
push dword [ebp - 0x18]
push dword [ebx + 0x28]
call sym.WIMGAPI.DLL_WIMSetTemporaryPath
test eax, eax
jne 0x1004a48c
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, eax
test edi, edi
jne 0x1004a371
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0x80070000
test eax, eax
jle 0x1004a34c
movzx eax, ax
or eax, esi
test eax, eax
jns 0x1004a361
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x1004a366
movzx edi, di
or edi, esi
jmp 0x1004a366
mov edi, 0x80004005
push edi
push 0x5b6
jmp 0x1004a18f
lea eax, [edi + 2]
cmp eax, edi
jb 0x1004a47c
push 2
pop ecx
mul ecx
test edx, edx
jne 0x1004a46c
cmp eax, 0xffffffff
ja 0x1004a46c
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov dword [ebp - 0xc], ecx
test ecx, ecx
jne 0x1004a3bb
mov eax, 0x8007000e
push eax
push 0x5c0
jmp 0x1004a18d
lea eax, [edi + 1]
cmp eax, edi
jb 0x1004a45a
push ecx
push eax
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x1004a40f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0x80070000
test eax, eax
jle 0x1004a3ea
movzx eax, ax
or eax, esi
test eax, eax
jns 0x1004a3ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x1004a404
movzx edi, di
or edi, esi
jmp 0x1004a404
mov edi, 0x80004005
push edi
push 0x5c8
jmp 0x1004a6e4
mov eax, dword [ebp - 0xc]
push eax
push dword [ebx + 0x28]
call sym.WIMGAPI.DLL_WIMSetTemporaryPath
test eax, eax
jne 0x1004a48c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0x80070000
test eax, eax
jle 0x1004a435
movzx eax, ax
or eax, esi
test eax, eax
jns 0x1004a44a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x1004a44f
movzx edi, di
or edi, esi
jmp 0x1004a44f
mov edi, 0x80004005
push edi
push 0x5d0
jmp 0x1004a6e4
mov eax, 0x80070216
push eax
mov edi, eax
push 0x5c3
jmp 0x1004a6e4
mov eax, 0x80070216
push eax
push 0x5bd
jmp 0x1004a18d
mov eax, 0x80070216
push eax
push 0x5ba
jmp 0x1004a18d
mov edx, dword [esi + 8]
push ecx
push ecx
mov ecx, dword [ebx + 0x28]
call fcn.100292ba
mov dword [ebx + 0x24], eax
test eax, eax
jne 0x1004a554
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0x80070000
test eax, eax
jle 0x1004a4ba
movzx eax, ax
or eax, esi
test eax, eax
jns 0x1004a4cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x1004a4d4
movzx edi, di
or edi, esi
jmp 0x1004a4d4
mov edi, 0x80004005
push edi
push 0x5d7
jmp 0x1004a6e4
mov edx, dword [esi + 8]
xor ecx, ecx
push 0
call fcn.100314e2
mov dword [ebx + 0x24], eax
test eax, eax
jne 0x1004a52d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0x80070000
test eax, eax
jle 0x1004a508
movzx eax, ax
or eax, esi
test eax, eax
jns 0x1004a51d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x1004a522
movzx edi, di
or edi, esi
jmp 0x1004a522
mov edi, 0x80004005
push edi
push 0x5e1
jmp 0x1004a18f
push 0
lea edx, [esi + 0xc]
mov dword [ebx + 0x3c], 1
mov ecx, eax
call fcn.10030a2b
or dword [esi + 0xc], 0x40000
lea edx, [esi + 0xc]
mov ecx, dword [ebx + 0x24]
push 0
call fcn.10030a60
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebx + 0x24]
call fcn.10030b36
test eax, eax
jne 0x1004a59e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0x80070000
test eax, eax
jle 0x1004a579
movzx eax, ax
or eax, esi
test eax, eax
jns 0x1004a58e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x1004a593
movzx edi, di
or edi, esi
jmp 0x1004a593
mov edi, 0x80004005
push edi
push 0x5f6
jmp 0x1004a6e4
mov ecx, dword [ebx + 0x24]
lea edx, [esi + 0x10]
call fcn.10030abe
test eax, eax
jne 0x1004a5e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0x80070000
test eax, eax
jle 0x1004a5c3
movzx eax, ax
or eax, esi
test eax, eax
jns 0x1004a5d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x1004a5dd
movzx edi, di
or edi, esi
jmp 0x1004a5dd
mov edi, 0x80004005
push edi
push 0x601
jmp 0x1004a6e4
mov ecx, dword [ebx + 0x24]
lea edx, [esi + 0xc]
push 0
call fcn.10030a60
test eax, eax
jne 0x1004a634
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0x80070000
test eax, eax
jle 0x1004a60f
movzx eax, ax
or eax, esi
test eax, eax
jns 0x1004a624
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x1004a629
movzx edi, di
or edi, esi
jmp 0x1004a629
mov edi, 0x80004005
push edi
push 0x60d
jmp 0x1004a6e4
xor ecx, ecx
cmp dword [ebx + 0x28], ecx
je 0x1004a692
mov eax, dword [esi + 0xc]
mov edx, dword [ebx + 8]
and eax, 0x8000000
push ecx
push ecx
mov ecx, dword [ebx + 0x24]
or eax, 0x1000008
push eax
call fcn.10029889
test eax, eax
jne 0x1004a692
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0x80070000
test eax, eax
jle 0x1004a670
movzx eax, ax
or eax, esi
test eax, eax
jns 0x1004a685
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x1004a68a
movzx edi, di
or edi, esi
jmp 0x1004a68a
mov edi, 0x80004005
push edi
push 0x620
jmp 0x1004a6e4
lea esi, [ebx + 0x38]
push esi
push 1
push 0x2000c
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x1004a6b0
and dword [esi], eax
mov eax, dword [ebp + 0x1c]
mov dword [eax], ebx
xor ebx, ebx
jmp 0x1004a6ee
mov eax, 0xc1420132
push eax
push 0x53b
jmp 0x1004a18d
mov eax, 0xc1420132
push eax
push 0x51b
jmp 0x1004a18d
mov edi, 0x80070057
push edi
push 0x514
mov ecx, 0x10009950
call fcn.1003a254
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x1004a705
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, ebx
call fcn.100497c0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18