Function at 0x498370
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffde0
push ebx
push esi
push edi
xor esi, esi
cmp dword [ebp + 0xc], 0
je 0x49872a
mov eax, dword [ebp + 0xc]
push eax
call fcn.0049c15c
pop ecx
mov edi, eax
test esi, esi
jne 0x4984bf
push esi
push edi
lea edi, [ebp - 0x11c]
mov esi, str._template_
mov eax, edi
lea edx, [ebp - 0x11c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
pop edi
pop esi
push edx
call fcn.0049c15c
pop ecx
mov ebx, eax
cmp ebx, edi
jg 0x4984bf
lea ecx, [ebp - 0x11c]
mov al, 1
mov dword [ebp - 8], ecx
xor edx, edx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
jmp 0x498413
mov eax, dword [ebp - 4]
mov al, byte [eax]
movsx ecx, al
cmp ecx, 0x40
jle 0x4983f3
movsx ecx, al
cmp ecx, 0x5b
jl 0x4983f7
xor ecx, ecx
jmp 0x4983fc
mov ecx, 1
shl ecx, 5
or al, cl
mov ecx, dword [ebp - 8]
cmp al, byte [ecx]
sete al
and eax, 1
inc edx
inc dword [ebp - 8]
inc dword [ebp - 4]
test al, al
je 0x49841b
cmp ebx, edx
jg 0x4983de
test al, al
je 0x4984bf
lea edx, [ebp - 0x220]
push edx
push 0x104
call sub.KERNEL32.DLL_GetTempPathA
test eax, eax
jle 0x4984bf
dec eax
mov byte [ebp + eax - 0x220], 0
cmp ebx, edi
jne 0x49847c
inc eax
push eax
call fcn.0049b898
mov esi, eax
pop ecx
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x220]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
jmp 0x4984bf
lea eax, [edi + eax]
sub eax, ebx
inc eax
push eax
call fcn.0049b898
mov esi, eax
pop ecx
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x220]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
add ebx, dword [ebp + 0xc]
push ebx
push esi
call fcn.0049c120
add esp, 8
test esi, esi
jne 0x4985dc
push esi
push edi
lea edi, [ebp - 0x11c]
mov esi, str._windows_
mov eax, edi
lea edx, [ebp - 0x11c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
pop edi
pop esi
push edx
call fcn.0049c15c
pop ecx
mov ebx, eax
cmp ebx, edi
jg 0x4985dc
lea ecx, [ebp - 0x11c]
mov al, 1
mov dword [ebp - 0x10], ecx
xor edx, edx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ecx
jmp 0x49853d
mov eax, dword [ebp - 0xc]
mov al, byte [eax]
movsx ecx, al
cmp ecx, 0x40
jle 0x49851d
movsx ecx, al
cmp ecx, 0x5b
jl 0x498521
xor ecx, ecx
jmp 0x498526
mov ecx, 1
shl ecx, 5
or al, cl
mov ecx, dword [ebp - 0x10]
cmp al, byte [ecx]
sete al
and eax, 1
inc edx
inc dword [ebp - 0x10]
inc dword [ebp - 0xc]
test al, al
je 0x498545
cmp ebx, edx
jg 0x498508
test al, al
je 0x4985dc
push 0x104
lea edx, [ebp - 0x220]
push edx
call sub.KERNEL32.DLL_GetWindowsDirectoryA
test eax, eax
jle 0x4985dc
cmp ebx, edi
jne 0x498599
inc eax
push eax
call fcn.0049b898
mov esi, eax
pop ecx
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x220]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
jmp 0x4985dc
lea eax, [edi + eax]
sub eax, ebx
inc eax
push eax
call fcn.0049b898
mov esi, eax
pop ecx
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x220]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
add ebx, dword [ebp + 0xc]
push ebx
push esi
call fcn.0049c120
add esp, 8
test esi, esi
jne 0x4986f8
push esi
push edi
lea edi, [ebp - 0x11c]
mov esi, str._system_
mov eax, edi
lea edx, [ebp - 0x11c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
pop edi
pop esi
push edx
call fcn.0049c15c
pop ecx
mov ebx, eax
cmp ebx, edi
jg 0x4986f8
lea ecx, [ebp - 0x11c]
mov al, 1
mov dword [ebp - 0x18], ecx
xor edx, edx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x14], ecx
jmp 0x498659
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
movsx ecx, al
cmp ecx, 0x40
jle 0x498639
movsx ecx, al
cmp ecx, 0x5b
jl 0x49863d
xor ecx, ecx
jmp 0x498642
mov ecx, 1
shl ecx, 5
or al, cl
mov ecx, dword [ebp - 0x18]
cmp al, byte [ecx]
sete al
and eax, 1
inc edx
inc dword [ebp - 0x18]
inc dword [ebp - 0x14]
test al, al
je 0x498661
cmp ebx, edx
jg 0x498624
test al, al
je 0x4986f8
push 0x104
lea edx, [ebp - 0x220]
push edx
call sub.KERNEL32.DLL_GetSystemDirectoryA
test eax, eax
jle 0x4986f8
cmp ebx, edi
jne 0x4986b5
inc eax
push eax
call fcn.0049b898
mov esi, eax
pop ecx
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x220]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
jmp 0x4986f8
lea eax, [edi + eax]
sub eax, ebx
inc eax
push eax
call fcn.0049b898
mov esi, eax
pop ecx
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x220]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
add ebx, dword [ebp + 0xc]
push ebx
push esi
call fcn.0049c120
add esp, 8
test esi, esi
jne 0x49872a
inc edi
push edi
call fcn.0049b898
mov esi, eax
mov eax, dword [ebp + 0xc]
mov edi, eax
xor eax, eax
pop ecx
push esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret